@@ -402,9 +402,9 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
402
402
if trait_params. len ( ) != impl_params. len ( ) {
403
403
tcx. sess . span_err (
404
404
span,
405
- format ! ( "lifetime parameters or bounds on method `{}` do \
405
+ & format ! ( "lifetime parameters or bounds on method `{}` do \
406
406
not match the trait declaration",
407
- token:: get_name( impl_m. name) ) [ ] ) ;
407
+ token:: get_name( impl_m. name) ) [ ] ) ;
408
408
return false ;
409
409
}
410
410
@@ -450,7 +450,7 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
450
450
let err = if missing. len ( ) != 0 || extra. len ( ) != 0 {
451
451
tcx. sess . span_err (
452
452
span,
453
- format ! (
453
+ & format ! (
454
454
"the lifetime parameter `{}` declared in the impl \
455
455
has a distinct set of bounds \
456
456
from its counterpart `{}` \
@@ -465,15 +465,15 @@ pub fn compare_impl_method<'tcx>(tcx: &ty::ctxt<'tcx>,
465
465
if missing. len ( ) != 0 {
466
466
tcx. sess . span_note (
467
467
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) ) [ ] ) ;
470
470
}
471
471
472
472
if extra. len ( ) != 0 {
473
473
tcx. sess . span_note (
474
474
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) ) [ ] ) ;
477
477
}
478
478
479
479
if err {
0 commit comments