File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -458,10 +458,10 @@ pub(crate) fn transform_instance<'tcx>(
458458 instance
459459}
460460
461- fn default_or_shim < ' tcx > ( instance : Instance < ' tcx > ) -> Option < DefId > {
461+ fn default_or_shim < ' tcx > ( tcx : TyCtxt < ' tcx > , instance : Instance < ' tcx > ) -> Option < DefId > {
462462 match instance. def {
463463 ty:: InstanceKind :: Item ( def_id) | ty:: InstanceKind :: FnPtrShim ( def_id, _) => {
464- tcx. opt_associated_item ( def_id)
464+ tcx. opt_associated_item ( def_id) . map ( |item| item . def_id )
465465 }
466466 _ => None ,
467467 }
@@ -483,9 +483,9 @@ fn implemented_method<'tcx>(
483483 trait_method = tcx. associated_item ( method_id) ;
484484 trait_id = trait_ref. skip_binder ( ) . def_id ;
485485 impl_id
486- } else if let Some ( trait_method_bound ) = default_or_shim ( instance) {
486+ } else if let Some ( trait_method_def_id ) = default_or_shim ( tcx , instance) {
487487 // Provided method in a `trait` block or a synthetic `shim`
488- trait_method = trait_method_bound ;
488+ trait_method = tcx . associated_item ( trait_method_def_id ) ;
489489 method_id = instance. def_id ( ) ;
490490 trait_id = tcx. trait_of_assoc ( method_id) ?;
491491 trait_ref = ty:: EarlyBinder :: bind ( TraitRef :: from_method ( tcx, trait_id, instance. args ) ) ;
You can’t perform that action at this time.
0 commit comments