@@ -32,7 +32,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
32
32
_,
33
33
) = error. clone ( )
34
34
&& let ( Subtype ( sup_trace) , Subtype ( sub_trace) ) = ( & sup_origin, & sub_origin)
35
- && let ObligationCauseCode :: CompareImplItem { trait_item_def_id, .. } =
35
+ && let & ObligationCauseCode :: CompareImplItem { trait_item_def_id, .. } =
36
36
sub_trace. cause . code ( )
37
37
&& sub_trace. values == sup_trace. values
38
38
&& let ValuePairs :: PolySigs ( ExpectedFound { expected, found } ) = sub_trace. values
@@ -50,9 +50,9 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
50
50
sp : Span ,
51
51
expected : ty:: PolyFnSig < ' tcx > ,
52
52
found : ty:: PolyFnSig < ' tcx > ,
53
- trait_def_id : DefId ,
53
+ trait_item_def_id : DefId ,
54
54
) -> ErrorGuaranteed {
55
- let trait_sp = self . tcx ( ) . def_span ( trait_def_id ) ;
55
+ let trait_sp = self . tcx ( ) . def_span ( trait_item_def_id ) ;
56
56
57
57
// Mark all unnamed regions in the type with a number.
58
58
// This diagnostic is called in response to lifetime errors, so be informative.
@@ -98,7 +98,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
98
98
. name ;
99
99
100
100
// Get the span of all the used type parameters in the method.
101
- let assoc_item = self . tcx ( ) . associated_item ( trait_def_id ) ;
101
+ let assoc_item = self . tcx ( ) . associated_item ( trait_item_def_id ) ;
102
102
let mut visitor = TypeParamSpanVisitor { tcx : self . tcx ( ) , types : vec ! [ ] } ;
103
103
match assoc_item. kind {
104
104
ty:: AssocKind :: Fn => {
0 commit comments