diff options
| author | lcnr <rust@lcnr.de> | 2024-11-19 21:11:55 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-11-19 21:36:23 +0100 |
| commit | 002efeb72ac465cf04660537ca902172ab0e491b (patch) | |
| tree | 80778abe011a9496cbc9be5b69181470c9db3af4 /compiler/rustc_trait_selection/src/traits/vtable.rs | |
| parent | d61effe58fb54e4adfcfe41bbf6536b5a7cdd1da (diff) | |
| download | rust-002efeb72ac465cf04660537ca902172ab0e491b.tar.gz rust-002efeb72ac465cf04660537ca902172ab0e491b.zip | |
additional `TypingEnv` cleanups
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/vtable.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/vtable.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/vtable.rs b/compiler/rustc_trait_selection/src/traits/vtable.rs index 8352d31d13a..b5bc8364c7b 100644 --- a/compiler/rustc_trait_selection/src/traits/vtable.rs +++ b/compiler/rustc_trait_selection/src/traits/vtable.rs @@ -9,8 +9,7 @@ use rustc_infer::traits::util::PredicateSet; use rustc_middle::bug; use rustc_middle::query::Providers; use rustc_middle::ty::{ - self, GenericArgs, GenericParamDefKind, Ty, TyCtxt, TypeVisitableExt, TypingMode, Upcast, - VtblEntry, + self, GenericArgs, GenericParamDefKind, Ty, TyCtxt, TypeVisitableExt, Upcast, VtblEntry, }; use rustc_span::{DUMMY_SP, Span, sym}; use smallvec::{SmallVec, smallvec}; @@ -442,8 +441,8 @@ fn trait_refs_are_compatible<'tcx>( return false; } - let infcx = tcx.infer_ctxt().build(TypingMode::PostAnalysis); - let param_env = ty::ParamEnv::reveal_all(); + let (infcx, param_env) = + tcx.infer_ctxt().build_with_typing_env(ty::TypingEnv::fully_monomorphized()); let ocx = ObligationCtxt::new(&infcx); let hr_source_principal = ocx.normalize(&ObligationCause::dummy(), param_env, hr_vtable_principal); |
