Add query to avoid name comparison in leaf_def
This commit is contained in:
parent
1b057a33bd
commit
3b7d496f72
8 changed files with 114 additions and 89 deletions
|
@ -1310,10 +1310,9 @@ fn create_mono_items_for_default_impls<'tcx>(
|
|||
if let Some(trait_ref) = tcx.impl_trait_ref(item.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_.items.iter().map(|iiref| iiref.ident.normalize_to_macros_2_0()).collect();
|
||||
let overridden_methods = tcx.impl_item_implementor_ids(item.def_id);
|
||||
for method in tcx.provided_trait_methods(trait_ref.def_id) {
|
||||
if overridden_methods.contains(&method.ident.normalize_to_macros_2_0()) {
|
||||
if overridden_methods.contains_key(&method.def_id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue