Skip to content

Commit

Permalink
normalzie before resolving associated items
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed May 27, 2022
1 parent 124673b commit de40841
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_ty_utils/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ fn inner_resolve_instance<'tcx>(

let result = if let Some(trait_def_id) = tcx.trait_of_item(def.did) {
debug!(" => associated item, attempting to find impl in param_env {:#?}", param_env);
let substs = tcx.normalize_erasing_regions(param_env, substs);
resolve_associated_item(tcx, def.did, param_env, trait_def_id, substs)
} else {
let ty = tcx.type_of(def.def_id_for_type_of());
Expand Down

0 comments on commit de40841

Please sign in to comment.