@@ -492,7 +492,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
492
492
Obligation {
493
493
cause : cause. clone ( ) ,
494
494
param_env : self . param_env ,
495
- predicate : predicate. clone ( ) ,
495
+ predicate : * predicate,
496
496
recursion_depth : 0 ,
497
497
} ,
498
498
) ) ;
@@ -676,7 +676,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
676
676
let span = self_ty. span . ctxt ( ) . outer_expn_data ( ) . call_site ;
677
677
let mut spans: MultiSpan = span. into ( ) ;
678
678
spans. push_span_label ( span, derive_msg. to_string ( ) ) ;
679
- let entry = spanned_predicates. entry ( spans. into ( ) ) ;
679
+ let entry = spanned_predicates. entry ( spans) ;
680
680
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
681
681
}
682
682
@@ -704,7 +704,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
704
704
ident. span . into ( )
705
705
} ;
706
706
spans. push_span_label ( ident. span , "in this trait" . to_string ( ) ) ;
707
- let entry = spanned_predicates. entry ( spans. into ( ) ) ;
707
+ let entry = spanned_predicates. entry ( spans) ;
708
708
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
709
709
}
710
710
@@ -748,7 +748,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
748
748
}
749
749
spans. push_span_label ( self_ty. span , String :: new ( ) ) ;
750
750
751
- let entry = spanned_predicates. entry ( spans. into ( ) ) ;
751
+ let entry = spanned_predicates. entry ( spans) ;
752
752
entry. or_insert_with ( || ( path, tr_self_ty, Vec :: new ( ) ) ) . 2 . push ( p) ;
753
753
}
754
754
_ => { }
@@ -1460,7 +1460,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1460
1460
{
1461
1461
derives. push ( (
1462
1462
self_name. clone ( ) ,
1463
- self_span. clone ( ) ,
1463
+ self_span,
1464
1464
parent_diagnostic_name. to_string ( ) ,
1465
1465
) ) ;
1466
1466
}
0 commit comments