Don't bind hidden types when searching for matching impls

This commit is contained in:
Oli Scherer 2022-02-10 14:53:50 +00:00
parent f42a6793ce
commit 1c5bfb1770
7 changed files with 74 additions and 39 deletions

View file

@ -2163,6 +2163,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let InferOk { obligations, .. } = self
.infcx
.at(&cause, obligation.param_env)
.define_opaque_types(false)
.eq(placeholder_obligation_trait_ref, impl_trait_ref)
.map_err(|e| debug!("match_impl: failed eq_trait_refs due to `{}`", e))?;
nested_obligations.extend(obligations);