@@ -484,12 +484,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
484
484
485
485
if let Some ( trait_item_span) = self . tcx . hir . span_if_local ( trait_item_def_id) {
486
486
let span = self . tcx . sess . codemap ( ) . def_span ( trait_item_span) ;
487
- err. span_label ( span, & format ! ( "definition of `{}` from trait" , item_name) ) ;
487
+ err. span_label ( span, format ! ( "definition of `{}` from trait" , item_name) ) ;
488
488
}
489
489
490
490
err. span_label (
491
491
error_span,
492
- & format ! ( "impl has extra requirement {}" , requirement) ) ;
492
+ format ! ( "impl has extra requirement {}" , requirement) ) ;
493
493
494
494
if let Some ( node_id) = lint_id {
495
495
self . tcx . sess . add_lint_diagnostic ( EXTRA_REQUIREMENT_IN_IMPL ,
@@ -582,7 +582,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
582
582
}
583
583
584
584
err. span_label ( span,
585
- & format ! ( "{}the trait `{}` is not implemented for `{}`" ,
585
+ format ! ( "{}the trait `{}` is not implemented for `{}`" ,
586
586
pre_message,
587
587
trait_ref,
588
588
trait_ref. self_ty( ) ) ) ;
@@ -738,11 +738,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
738
738
expected_ref,
739
739
found_ref) ;
740
740
741
- err. span_label ( span, & format ! ( "{}" , type_error) ) ;
741
+ err. span_label ( span, format ! ( "{}" , type_error) ) ;
742
742
743
743
if let Some ( sp) = found_span {
744
- err. span_label ( span, & format ! ( "requires `{}`" , found_ref) ) ;
745
- err. span_label ( sp, & format ! ( "implements `{}`" , expected_ref) ) ;
744
+ err. span_label ( span, format ! ( "requires `{}`" , found_ref) ) ;
745
+ err. span_label ( sp, format ! ( "implements `{}`" , expected_ref) ) ;
746
746
}
747
747
748
748
err
@@ -765,12 +765,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
765
765
if expected == 1 { "" } else { "s" } ,
766
766
if expected == 1 { "is" } else { "are" } ) ;
767
767
768
- err. span_label ( span, & format ! ( "expected {} that takes {} argument{}" ,
768
+ err. span_label ( span, format ! ( "expected {} that takes {} argument{}" ,
769
769
if is_closure { "closure" } else { "function" } ,
770
770
expected,
771
771
if expected == 1 { "" } else { "s" } ) ) ;
772
772
if let Some ( span) = found_span {
773
- err. span_label ( span, & format ! ( "takes {} argument{}" ,
773
+ err. span_label ( span, format ! ( "takes {} argument{}" ,
774
774
found,
775
775
if found == 1 { "" } else { "s" } ) ) ;
776
776
}
@@ -789,7 +789,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
789
789
let mut err = struct_span_err ! ( self . sess, span, E0072 ,
790
790
"recursive type `{}` has infinite size" ,
791
791
self . item_path_str( type_def_id) ) ;
792
- err. span_label ( span, & format ! ( "recursive type has infinite size" ) ) ;
792
+ err. span_label ( span, "recursive type has infinite size" ) ;
793
793
err. help ( & format ! ( "insert indirection (e.g., a `Box`, `Rc`, or `&`) \
794
794
at some point to make `{}` representable",
795
795
self . item_path_str( type_def_id) ) ) ;
@@ -808,7 +808,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
808
808
self . sess, span, E0038 ,
809
809
"the trait `{}` cannot be made into an object" ,
810
810
trait_str) ;
811
- err. span_label ( span, & format ! ( "the trait `{}` cannot be made into an object" , trait_str) ) ;
811
+ err. span_label ( span, format ! ( "the trait `{}` cannot be made into an object" , trait_str) ) ;
812
812
813
813
let mut reported_violations = FxHashSet ( ) ;
814
814
for violation in violations {
@@ -1043,7 +1043,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
1043
1043
"type annotations needed" ) ;
1044
1044
1045
1045
for ( target_span, label_message) in labels {
1046
- err. span_label ( target_span, & label_message) ;
1046
+ err. span_label ( target_span, label_message) ;
1047
1047
}
1048
1048
1049
1049
err. emit ( ) ;
0 commit comments