@@ -638,7 +638,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
638
638
let parent_trait_ref = data. parent_trait_pred ;
639
639
let path = parent_trait_ref. print_modifiers_and_trait_path ( ) ;
640
640
let tr_self_ty = parent_trait_ref. skip_binder ( ) . self_ty ( ) ;
641
- let unsatisfied_msg = "unsatisfied trait bound introduced here" . to_string ( ) ;
641
+ let unsatisfied_msg = "unsatisfied trait bound introduced here" ;
642
642
let derive_msg =
643
643
"unsatisfied trait bound introduced in this `derive` macro" ;
644
644
match self . tcx . hir ( ) . get_if_local ( impl_def_id) {
@@ -655,7 +655,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
655
655
{
656
656
let span = ident. span . ctxt ( ) . outer_expn_data ( ) . call_site ;
657
657
let mut spans: MultiSpan = span. into ( ) ;
658
- spans. push_span_label ( span, derive_msg. to_string ( ) ) ;
658
+ spans. push_span_label ( span, derive_msg) ;
659
659
let entry = spanned_predicates. entry ( spans) ;
660
660
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
661
661
}
@@ -678,7 +678,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
678
678
{
679
679
let span = self_ty. span . ctxt ( ) . outer_expn_data ( ) . call_site ;
680
680
let mut spans: MultiSpan = span. into ( ) ;
681
- spans. push_span_label ( span, derive_msg. to_string ( ) ) ;
681
+ spans. push_span_label ( span, derive_msg) ;
682
682
let entry = spanned_predicates. entry ( spans) ;
683
683
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
684
684
}
@@ -706,7 +706,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
706
706
} else {
707
707
ident. span . into ( )
708
708
} ;
709
- spans. push_span_label ( ident. span , "in this trait" . to_string ( ) ) ;
709
+ spans. push_span_label ( ident. span , "in this trait" ) ;
710
710
let entry = spanned_predicates. entry ( spans) ;
711
711
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
712
712
}
@@ -747,9 +747,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
747
747
spans. into ( )
748
748
} ;
749
749
if let Some ( trait_ref) = of_trait {
750
- spans. push_span_label ( trait_ref. path . span , String :: new ( ) ) ;
750
+ spans. push_span_label ( trait_ref. path . span , "" ) ;
751
751
}
752
- spans. push_span_label ( self_ty. span , String :: new ( ) ) ;
752
+ spans. push_span_label ( self_ty. span , "" ) ;
753
753
754
754
let entry = spanned_predicates. entry ( spans) ;
755
755
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
0 commit comments