From 1c5bfb17703975ff9952243c24c46cf54fe0d49c Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 10 Feb 2022 14:53:50 +0000 Subject: Don't bind hidden types when searching for matching impls --- compiler/rustc_trait_selection/src/traits/select/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler') diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 9b8a49e512b..76526df6461 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -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); -- cgit 1.4.1-3-g733a5