@@ -28,7 +28,6 @@ use super::{potentially_plural_count, FnCtxt, Inherited};
2828/// - `impl_m_span`: span to use for reporting errors
2929/// - `trait_m`: the method in the trait
3030/// - `impl_trait_ref`: the TraitRef corresponding to the trait implementation
31-
3231crate fn compare_impl_method < ' tcx > (
3332 tcx : TyCtxt < ' tcx > ,
3433 impl_m : & ty:: AssocItem ,
@@ -88,7 +87,7 @@ fn compare_predicate_entailment<'tcx>(
8887 impl_m_span,
8988 impl_m_hir_id,
9089 ObligationCauseCode :: CompareImplMethodObligation {
91- impl_item_def_id : impl_m. def_id ,
90+ impl_item_def_id : impl_m. def_id . expect_local ( ) ,
9291 trait_item_def_id : trait_m. def_id ,
9392 } ,
9493 ) ;
@@ -231,7 +230,7 @@ fn compare_predicate_entailment<'tcx>(
231230 span,
232231 impl_m_hir_id,
233232 ObligationCauseCode :: CompareImplMethodObligation {
234- impl_item_def_id : impl_m. def_id ,
233+ impl_item_def_id : impl_m. def_id . expect_local ( ) ,
235234 trait_item_def_id : trait_m. def_id ,
236235 } ,
237236 ) ;
@@ -1154,7 +1153,7 @@ fn compare_type_predicate_entailment<'tcx>(
11541153 impl_ty_span,
11551154 impl_ty_hir_id,
11561155 ObligationCauseCode :: CompareImplTypeObligation {
1157- impl_item_def_id : impl_ty. def_id ,
1156+ impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
11581157 trait_item_def_id : trait_ty. def_id ,
11591158 } ,
11601159 ) ;
@@ -1383,7 +1382,7 @@ pub fn check_type_bounds<'tcx>(
13831382 impl_ty_span,
13841383 impl_ty_hir_id,
13851384 ObligationCauseCode :: CheckAssociatedTypeBounds {
1386- impl_item_def_id : impl_ty. def_id ,
1385+ impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
13871386 trait_item_def_id : trait_ty. def_id ,
13881387 } ,
13891388 ) ;
0 commit comments