Skip to content

Commit ac32974

Browse files
committed
Update for new slicing syntax.
1 parent a931cdc commit ac32974

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc_typeck/check/compare_method.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
402402
if trait_params.len() != impl_params.len() {
403403
tcx.sess.span_err(
404404
span,
405-
format!("lifetime parameters or bounds on method `{}` do \
405+
&format!("lifetime parameters or bounds on method `{}` do \
406406
not match the trait declaration",
407-
token::get_name(impl_m.name))[]);
407+
token::get_name(impl_m.name))[]);
408408
return false;
409409
}
410410

@@ -450,7 +450,7 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
450450
let err = if missing.len() != 0 || extra.len() != 0 {
451451
tcx.sess.span_err(
452452
span,
453-
format!(
453+
&format!(
454454
"the lifetime parameter `{}` declared in the impl \
455455
has a distinct set of bounds \
456456
from its counterpart `{}` \
@@ -465,15 +465,15 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
465465
if missing.len() != 0 {
466466
tcx.sess.span_note(
467467
span,
468-
format!("the impl is missing the following bounds: `{}`",
469-
missing.user_string(tcx))[]);
468+
&format!("the impl is missing the following bounds: `{}`",
469+
missing.user_string(tcx))[]);
470470
}
471471

472472
if extra.len() != 0 {
473473
tcx.sess.span_note(
474474
span,
475-
format!("the impl has the following extra bounds: `{}`",
476-
extra.user_string(tcx))[]);
475+
&format!("the impl has the following extra bounds: `{}`",
476+
extra.user_string(tcx))[]);
477477
}
478478

479479
if err {

0 commit comments

Comments
 (0)