Normalize the trait_ref
This commit is contained in:
parent
acfe99a98e
commit
745c76d657
1 changed files with 5 additions and 6 deletions
|
|
@ -1143,6 +1143,11 @@ fn create_mono_items_for_default_impls<'tcx>(
|
|||
def_id_to_string(tcx, impl_def_id));
|
||||
|
||||
if let Some(trait_ref) = tcx.impl_trait_ref(impl_def_id) {
|
||||
let param_env = ty::ParamEnv::reveal_all();
|
||||
let trait_ref = tcx.normalize_erasing_regions(
|
||||
param_env,
|
||||
trait_ref,
|
||||
);
|
||||
let overridden_methods: FxHashSet<_> =
|
||||
impl_item_refs.iter()
|
||||
.map(|iiref| iiref.ident.modern())
|
||||
|
|
@ -1165,12 +1170,6 @@ fn create_mono_items_for_default_impls<'tcx>(
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
let param_env = ty::ParamEnv::reveal_all();
|
||||
let substs = tcx.normalize_erasing_regions(
|
||||
param_env,
|
||||
substs,
|
||||
);
|
||||
let instance = ty::Instance::resolve(tcx,
|
||||
param_env,
|
||||
method.def_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue