]> git.lizzy.rs Git - rust.git/commit
Auto merge of #100043 - RalfJung:scalar-always-init, r=RalfJung
authorbors <bors@rust-lang.org>
Fri, 26 Aug 2022 21:50:09 +0000 (21:50 +0000)
committerbors <bors@rust-lang.org>
Fri, 26 Aug 2022 21:50:09 +0000 (21:50 +0000)
commit2b443a8d97ff1f26c35e4bcf682bf9a89e8a66d2
treef8fda39334d16175c69f121ad282df2f9d92e9fd
parentc07a8b4e09f356c7468b69c50cac7fc5b5000b8a
parent62b6a8b7b84ebaa375bd2b3a2f1df75b640be0ab
Auto merge of #100043 - RalfJung:scalar-always-init, r=RalfJung

interpret: remove support for uninitialized scalars

With Miri no longer supporting `-Zmiri-allow-uninit-numbers`, we no longer need to support storing uninit data in a `Scalar`. We anyway already only use this representation for types with *initialized* `Scalar` layout (and we have to, due to partial initialization), so let's get rid of the `ScalarMaybeUninit` type entirely.

I tried to stage this into meaningful commits, but the one that changes `read_immediate` to always trigger UB on uninit is the largest chunk of the PR and I don't see how it could be subdivided.

Fixes https://github.com/rust-lang/miri/issues/2187
r? `@oli-obk`