Skip to content

Commit 7716541

Browse files
jroeschJared Roesch
authored and
Jared Roesch
committed
Address tidy
1 parent 99a1293 commit 7716541

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/librustc/middle/ty.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5453,7 +5453,8 @@ impl<'tcx> ctxt<'tcx> {
54535453
expected.ty,
54545454
found.ty));
54555455

5456-
match (expected.def_id.krate == ast::LOCAL_CRATE, self.map.opt_span(expected.def_id.node)) {
5456+
match (expected.def_id.krate == ast::LOCAL_CRATE,
5457+
self.map.opt_span(expected.def_id.node)) {
54575458
(true, Some(span)) => {
54585459
self.sess.span_note(span,
54595460
&format!("a default was defined here..."));
@@ -5464,15 +5465,17 @@ impl<'tcx> ctxt<'tcx> {
54645465
.map(|p| p.to_string())
54655466
.collect::<Vec<_>>();
54665467
self.sess.note(
5467-
&format!("a default is defined on `{}`",
5468+
&format!("a default is defined on `{}`",
54685469
elems.join("::")));
54695470
}
54705471
}
54715472

5472-
self.sess.span_note(expected.origin_span,
5473-
&format!("...that was applied to an unconstrained type variable here"));
5473+
self.sess.span_note(
5474+
expected.origin_span,
5475+
&format!("...that was applied to an unconstrained type variable here"));
54745476

5475-
match (found.def_id.krate == ast::LOCAL_CRATE, self.map.opt_span(found.def_id.node)) {
5477+
match (found.def_id.krate == ast::LOCAL_CRATE,
5478+
self.map.opt_span(found.def_id.node)) {
54765479
(true, Some(span)) => {
54775480
self.sess.span_note(span,
54785481
&format!("a second default was defined here..."));
@@ -5488,8 +5491,9 @@ impl<'tcx> ctxt<'tcx> {
54885491
}
54895492
}
54905493

5491-
self.sess.span_note(found.origin_span,
5492-
&format!("...that also applies to the same type variable here"));
5494+
self.sess.span_note(
5495+
found.origin_span,
5496+
&format!("...that also applies to the same type variable here"));
54935497
}
54945498
_ => {}
54955499
}

src/librustc_typeck/check/method/confirm.rs

Lines changed: 3 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)