Skip to content

Commit 16af433

Browse files
committed
Address tidy
1 parent 0943327 commit 16af433

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/librustc/middle/ty.rs

+11-7
Original file line numberDiff line numberDiff line change
@@ -5471,7 +5471,8 @@ impl<'tcx> ctxt<'tcx> {
54715471
expected.ty,
54725472
found.ty));
54735473

5474-
match (expected.def_id.krate == ast::LOCAL_CRATE, self.map.opt_span(expected.def_id.node)) {
5474+
match (expected.def_id.krate == ast::LOCAL_CRATE,
5475+
self.map.opt_span(expected.def_id.node)) {
54755476
(true, Some(span)) => {
54765477
self.sess.span_note(span,
54775478
&format!("a default was defined here..."));
@@ -5482,15 +5483,17 @@ impl<'tcx> ctxt<'tcx> {
54825483
.map(|p| p.to_string())
54835484
.collect::<Vec<_>>();
54845485
self.sess.note(
5485-
&format!("a default is defined on `{}`",
5486+
&format!("a default is defined on `{}`",
54865487
elems.join("::")));
54875488
}
54885489
}
54895490

5490-
self.sess.span_note(expected.origin_span,
5491-
&format!("...that was applied to an unconstrained type variable here"));
5491+
self.sess.span_note(
5492+
expected.origin_span,
5493+
&format!("...that was applied to an unconstrained type variable here"));
54925494

5493-
match (found.def_id.krate == ast::LOCAL_CRATE, self.map.opt_span(found.def_id.node)) {
5495+
match (found.def_id.krate == ast::LOCAL_CRATE,
5496+
self.map.opt_span(found.def_id.node)) {
54945497
(true, Some(span)) => {
54955498
self.sess.span_note(span,
54965499
&format!("a second default was defined here..."));
@@ -5506,8 +5509,9 @@ impl<'tcx> ctxt<'tcx> {
55065509
}
55075510
}
55085511

5509-
self.sess.span_note(found.origin_span,
5510-
&format!("...that also applies to the same type variable here"));
5512+
self.sess.span_note(
5513+
found.origin_span,
5514+
&format!("...that also applies to the same type variable here"));
55115515
}
55125516
_ => {}
55135517
}

src/librustc_typeck/check/method/confirm.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@ impl<'a,'tcx> ConfirmContext<'a,'tcx> {
349349
} else if num_supplied_types != num_method_types {
350350
span_err!(self.tcx().sess, self.span, E0036,
351351
"incorrect number of type parameters given for this method");
352-
final_substs.types.replace(subst::FnSpace, vec![self.tcx().types.err; num_method_types]);
352+
final_substs.types.replace(
353+
subst::FnSpace,
354+
vec![self.tcx().types.err; num_method_types]);
353355
} else {
354356
final_substs.types.replace(subst::FnSpace, supplied_method_types);
355357
}

src/librustc_typeck/check/method/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ pub fn lookup_in_trait_adjusted<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
190190
type_parameter_defs);
191191
}
192192
}
193-
193+
194194
let trait_ref = ty::TraitRef::new(trait_def_id, fcx.tcx().mk_substs(substs));
195195

196196
// Construct an obligation

0 commit comments

Comments
 (0)