@@ -484,12 +484,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
484484
485485 if let Some ( trait_item_span) = self . tcx . hir . span_if_local ( trait_item_def_id) {
486486 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) ) ;
488488 }
489489
490490 err. span_label (
491491 error_span,
492- & format ! ( "impl has extra requirement {}" , requirement) ) ;
492+ format ! ( "impl has extra requirement {}" , requirement) ) ;
493493
494494 if let Some ( node_id) = lint_id {
495495 self . tcx . sess . add_lint_diagnostic ( EXTRA_REQUIREMENT_IN_IMPL ,
@@ -582,7 +582,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
582582 }
583583
584584 err. span_label ( span,
585- & format ! ( "{}the trait `{}` is not implemented for `{}`" ,
585+ format ! ( "{}the trait `{}` is not implemented for `{}`" ,
586586 pre_message,
587587 trait_ref,
588588 trait_ref. self_ty( ) ) ) ;
@@ -738,11 +738,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
738738 expected_ref,
739739 found_ref) ;
740740
741- err. span_label ( span, & format ! ( "{}" , type_error) ) ;
741+ err. span_label ( span, format ! ( "{}" , type_error) ) ;
742742
743743 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) ) ;
746746 }
747747
748748 err
@@ -765,12 +765,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
765765 if expected == 1 { "" } else { "s" } ,
766766 if expected == 1 { "is" } else { "are" } ) ;
767767
768- err. span_label ( span, & format ! ( "expected {} that takes {} argument{}" ,
768+ err. span_label ( span, format ! ( "expected {} that takes {} argument{}" ,
769769 if is_closure { "closure" } else { "function" } ,
770770 expected,
771771 if expected == 1 { "" } else { "s" } ) ) ;
772772 if let Some ( span) = found_span {
773- err. span_label ( span, & format ! ( "takes {} argument{}" ,
773+ err. span_label ( span, format ! ( "takes {} argument{}" ,
774774 found,
775775 if found == 1 { "" } else { "s" } ) ) ;
776776 }
@@ -789,7 +789,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
789789 let mut err = struct_span_err ! ( self . sess, span, E0072 ,
790790 "recursive type `{}` has infinite size" ,
791791 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" ) ;
793793 err. help ( & format ! ( "insert indirection (e.g., a `Box`, `Rc`, or `&`) \
794794 at some point to make `{}` representable",
795795 self . item_path_str( type_def_id) ) ) ;
@@ -808,7 +808,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
808808 self . sess, span, E0038 ,
809809 "the trait `{}` cannot be made into an object" ,
810810 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) ) ;
812812
813813 let mut reported_violations = FxHashSet ( ) ;
814814 for violation in violations {
@@ -1043,7 +1043,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
10431043 "type annotations needed" ) ;
10441044
10451045 for ( target_span, label_message) in labels {
1046- err. span_label ( target_span, & label_message) ;
1046+ err. span_label ( target_span, label_message) ;
10471047 }
10481048
10491049 err. emit ( ) ;
0 commit comments