Address tidy
This commit is contained in:
parent
99a12933fb
commit
77165415b7
src
@ -5453,7 +5453,8 @@ impl<'tcx> ctxt<'tcx> {
|
||||
expected.ty,
|
||||
found.ty));
|
||||
|
||||
match (expected.def_id.krate == ast::LOCAL_CRATE, self.map.opt_span(expected.def_id.node)) {
|
||||
match (expected.def_id.krate == ast::LOCAL_CRATE,
|
||||
self.map.opt_span(expected.def_id.node)) {
|
||||
(true, Some(span)) => {
|
||||
self.sess.span_note(span,
|
||||
&format!("a default was defined here..."));
|
||||
@ -5464,15 +5465,17 @@ impl<'tcx> ctxt<'tcx> {
|
||||
.map(|p| p.to_string())
|
||||
.collect::<Vec<_>>();
|
||||
self.sess.note(
|
||||
&format!("a default is defined on `{}`",
|
||||
&format!("a default is defined on `{}`",
|
||||
elems.join("::")));
|
||||
}
|
||||
}
|
||||
|
||||
self.sess.span_note(expected.origin_span,
|
||||
&format!("...that was applied to an unconstrained type variable here"));
|
||||
self.sess.span_note(
|
||||
expected.origin_span,
|
||||
&format!("...that was applied to an unconstrained type variable here"));
|
||||
|
||||
match (found.def_id.krate == ast::LOCAL_CRATE, self.map.opt_span(found.def_id.node)) {
|
||||
match (found.def_id.krate == ast::LOCAL_CRATE,
|
||||
self.map.opt_span(found.def_id.node)) {
|
||||
(true, Some(span)) => {
|
||||
self.sess.span_note(span,
|
||||
&format!("a second default was defined here..."));
|
||||
@ -5488,8 +5491,9 @@ impl<'tcx> ctxt<'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
self.sess.span_note(found.origin_span,
|
||||
&format!("...that also applies to the same type variable here"));
|
||||
self.sess.span_note(
|
||||
found.origin_span,
|
||||
&format!("...that also applies to the same type variable here"));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
@ -349,7 +349,9 @@ impl<'a,'tcx> ConfirmContext<'a,'tcx> {
|
||||
} else if num_supplied_types != num_method_types {
|
||||
span_err!(self.tcx().sess, self.span, E0036,
|
||||
"incorrect number of type parameters given for this method");
|
||||
final_substs.types.replace(subst::FnSpace, vec![self.tcx().types.err; num_method_types]);
|
||||
final_substs.types.replace(
|
||||
subst::FnSpace,
|
||||
vec![self.tcx().types.err; num_method_types]);
|
||||
} else {
|
||||
final_substs.types.replace(subst::FnSpace, supplied_method_types);
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
|
||||
type_parameter_defs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let trait_ref = ty::TraitRef::new(trait_def_id, fcx.tcx().mk_substs(substs));
|
||||
|
||||
// Construct an obligation
|
||||
|
Loading…
x
Reference in New Issue
Block a user