@@ -28,7 +28,6 @@ use super::{potentially_plural_count, FnCtxt, Inherited};
28
28
/// - `impl_m_span`: span to use for reporting errors
29
29
/// - `trait_m`: the method in the trait
30
30
/// - `impl_trait_ref`: the TraitRef corresponding to the trait implementation
31
-
32
31
crate fn compare_impl_method < ' tcx > (
33
32
tcx : TyCtxt < ' tcx > ,
34
33
impl_m : & ty:: AssocItem ,
@@ -88,7 +87,7 @@ fn compare_predicate_entailment<'tcx>(
88
87
impl_m_span,
89
88
impl_m_hir_id,
90
89
ObligationCauseCode :: CompareImplMethodObligation {
91
- impl_item_def_id : impl_m. def_id ,
90
+ impl_item_def_id : impl_m. def_id . expect_local ( ) ,
92
91
trait_item_def_id : trait_m. def_id ,
93
92
} ,
94
93
) ;
@@ -231,7 +230,7 @@ fn compare_predicate_entailment<'tcx>(
231
230
span,
232
231
impl_m_hir_id,
233
232
ObligationCauseCode :: CompareImplMethodObligation {
234
- impl_item_def_id : impl_m. def_id ,
233
+ impl_item_def_id : impl_m. def_id . expect_local ( ) ,
235
234
trait_item_def_id : trait_m. def_id ,
236
235
} ,
237
236
) ;
@@ -1154,7 +1153,7 @@ fn compare_type_predicate_entailment<'tcx>(
1154
1153
impl_ty_span,
1155
1154
impl_ty_hir_id,
1156
1155
ObligationCauseCode :: CompareImplTypeObligation {
1157
- impl_item_def_id : impl_ty. def_id ,
1156
+ impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
1158
1157
trait_item_def_id : trait_ty. def_id ,
1159
1158
} ,
1160
1159
) ;
@@ -1383,7 +1382,7 @@ pub fn check_type_bounds<'tcx>(
1383
1382
impl_ty_span,
1384
1383
impl_ty_hir_id,
1385
1384
ObligationCauseCode :: CheckAssociatedTypeBounds {
1386
- impl_item_def_id : impl_ty. def_id ,
1385
+ impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
1387
1386
trait_item_def_id : trait_ty. def_id ,
1388
1387
} ,
1389
1388
) ;
0 commit comments