Skip to content

Commit 0850bad

Browse files
committed
extra assertion, extra sure
1 parent 595dd97 commit 0850bad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler/rustc_const_eval/src/interpret/operator.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
3232
let pair = Immediate::ScalarPair(val.into(), Scalar::from_bool(overflowed).into());
3333
self.write_immediate(pair, dest)?;
3434
} else {
35+
assert!(self.tcx.sess.opts.debugging_opts.randomize_layout);
3536
// With randomized layout, `(int, bool)` might cease to be a `ScalarPair`, so we have to
3637
// do a component-wise write here. This code path is slower than the above because
3738
// `place_field` will have to `force_allocate` locals here.

0 commit comments

Comments
 (0)