about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-07-04 09:12:22 -0400
committerRalf Jung <post@ralfj.de>2022-07-04 09:12:22 -0400
commit0850bad94dab9499a6dde0f303a73220a21a2f71 (patch)
tree96e8e0f3473c79a124d8cd05f40911abb59e183e /compiler/rustc_const_eval/src/interpret
parent595dd976bdcf54f9de336fcf4665d87e426ffc35 (diff)
downloadrust-0850bad94dab9499a6dde0f303a73220a21a2f71.tar.gz
rust-0850bad94dab9499a6dde0f303a73220a21a2f71.zip
extra assertion, extra sure
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/operator.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operator.rs b/compiler/rustc_const_eval/src/interpret/operator.rs
index 5d044a7fcd1..dec7fa8c4aa 100644
--- a/compiler/rustc_const_eval/src/interpret/operator.rs
+++ b/compiler/rustc_const_eval/src/interpret/operator.rs
@@ -32,6 +32,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
             let pair = Immediate::ScalarPair(val.into(), Scalar::from_bool(overflowed).into());
             self.write_immediate(pair, dest)?;
         } else {
+            assert!(self.tcx.sess.opts.debugging_opts.randomize_layout);
             // With randomized layout, `(int, bool)` might cease to be a `ScalarPair`, so we have to
             // do a component-wise write here. This code path is slower than the above because
             // `place_field` will have to `force_allocate` locals here.