Skip to content

Commit 0da23e7

Browse files
Use existing typing env when building infer context
Co-authored-by: Oli Scherer <[email protected]>
1 parent ad5fa57 commit 0da23e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
166166
let (infcx, param_env) = self
167167
.tcx
168168
.infer_ctxt()
169-
.build_with_typing_env(ty::TypingEnv::fully_monomorphized());
169+
.build_with_typing_env(self.typing_env);
170170

171171
let type_impls_trait = preds.iter().all(|pred| {
172172
let trait_ref = ty::TraitRef::new(tcx, pred.def_id(), [tp_ty]);

0 commit comments

Comments
 (0)