about summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-22 20:48:33 +0000
committerbors <bors@rust-lang.org>2022-12-22 20:48:33 +0000
commit8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9 (patch)
tree07729f9a28b88920d82e17528075cb9d5022b7cb /compiler/rustc_const_eval
parentcca80b9a81d495f543cdc122fa330c7f68fff3a8 (diff)
parentee43f34700304e73d4e58fc643186717f1851659 (diff)
downloadrust-8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9.tar.gz
rust-8a97b4812a7a46bb5206487c2455b9c5bfcbd1b9.zip
Auto merge of #106054 - matthiaskrgr:rollup-38epsfh, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #105567 (KCFI test: Also support LLVM 16 output)
 - #105847 (Ensure param-env is const before calling `eval_to_valtree`)
 - #105983 (Add a missing early return in drop tracking `handle_uninhabited_return`)
 - #106027 (rustdoc: simplify CSS and DOM for more-scraped-examples)
 - #106035 (Migrate search tab title color to CSS variable)
 - #106037 (Add regression test for #94293)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/interpret/operand.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs
index 4dc4066e031..fcc6f8ea852 100644
--- a/compiler/rustc_const_eval/src/interpret/operand.rs
+++ b/compiler/rustc_const_eval/src/interpret/operand.rs
@@ -577,8 +577,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
             ty::ConstKind::Unevaluated(uv) => {
                 let instance = self.resolve(uv.def, uv.substs)?;
                 let cid = GlobalId { instance, promoted: None };
-                self.ctfe_query(span, |tcx| tcx.eval_to_valtree(self.param_env.and(cid)))?
-                    .unwrap_or_else(|| bug!("unable to create ValTree for {uv:?}"))
+                self.ctfe_query(span, |tcx| {
+                    tcx.eval_to_valtree(self.param_env.with_const().and(cid))
+                })?
+                .unwrap_or_else(|| bug!("unable to create ValTree for {uv:?}"))
             }
             ty::ConstKind::Bound(..) | ty::ConstKind::Infer(..) => {
                 span_bug!(self.cur_span(), "unexpected ConstKind in ctfe: {val:?}")