Uh oh!
There was an error while loading. Please reload this page.
do not normalize all non-scalar constants to a ConstValue::ScalarPair - #54693
Conversation
RalfJung
commented
Oct 1, 2018
Cc @oli-obk |
oli-obk
commented
Oct 1, 2018
@bors r+ |
bors
commented
Oct 1, 2018
📌 Commit d62aa3e has been approved by |
RalfJung
commented
Oct 1, 2018
A less risky variant for beta might be to just backport the changes in |
bors
commented
Oct 1, 2018
do not normalize all non-scalar constants to a ConstValue::ScalarPair We still need `ConstValue::ScalarPair` for match handling (matching slices and strings), but that will never see anything `Undef`. For non-fat-ptr `ScalarPair`, just point to the allocation like larger data structures do. Fixes#54387 r? @eddyb
bors
commented
Oct 2, 2018
☀️ Test successful - status-appveyor, status-travis |
rust-highfive
commented
Oct 2, 2018
📣 Toolstate changed by #54693! Tested on commit 7cbcdae. 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk, @rust-lang/infra). |
Tested on commit rust-lang/rust@7cbcdae. Direct link to PR: <rust-lang/rust#54693> 💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth@llogiq@mcarton@oli-obk, @rust-lang/infra). 💔 miri on windows: test-pass → build-fail (cc @oli-obk@RalfJung@eddyb, @rust-lang/infra). 💔 miri on linux: test-pass → build-fail (cc @oli-obk@RalfJung@eddyb, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).
eddyb
commented
Oct 2, 2018
So the argument here is that anything that doesn't need an allocation should be fully initialized? |
Yes. We have those variants only because pattern matching and some code around array lengths need them. No reason they should have to handle Everything gets an allocation anyway from the way |
RalfJung
commented
Oct 2, 2018
Also see #54738 |
RalfJung
commented
Oct 2, 2018
I made a beta backport at #54759 |
RalfJung
commented
Oct 2, 2018
Oh dang. Now I see @oli-obk already did that. oops^^ |
pnkfelix
commented
Oct 4, 2018
T-compiler accepted #54759 for the backport. |
We still need
ConstValue::ScalarPairfor match handling (matching slices and strings), but that will never see anythingUndef. For non-fat-ptrScalarPair, just point to the allocation like larger data structures do.Fixes#54387
r? @eddyb