]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #96220 - RalfJung:scalar-no-padding, r=oli-obk
authorbors <bors@rust-lang.org>
Wed, 11 May 2022 18:34:14 +0000 (18:34 +0000)
committerbors <bors@rust-lang.org>
Wed, 11 May 2022 18:34:14 +0000 (18:34 +0000)
commit6dd68402c5d7da168f87d8551dd9aed1d8a21893
tree134754bcdac863ca1a669424dd76f2225cb176e5
parent08b4f1be33607fc4f18ce19cfd475ac9f43213fc
parent14f6daf9359c920da3da6ccce41fa910dc2074a3
Auto merge of #96220 - RalfJung:scalar-no-padding, r=oli-obk

tighten sanity checks around Scalar and ScalarPair

While investigating https://github.com/rust-lang/rust/issues/96185 I noticed codegen has tighter sanity checks here than Miri does, so I added some more assertions. Strangely, some of them fail, so I also needed to add a HACK... that is probably worth looking into.

This does not fix that issue, but it changes the ICE messages, making it quite clear that we have a scalar whose size is not the same as that of the surrounding layout.

r? `@oli-obk`
compiler/rustc_const_eval/src/interpret/operand.rs
compiler/rustc_const_eval/src/interpret/place.rs