Auto merge of #54693 - RalfJung:ctfe-scalar-pair-undef, r=oli-obk

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 https://github.com/rust-lang/rust/issues/54387

r? @eddyb
This commit is contained in:
bors 2018-10-01 22:32:26 +00:00
commit 7cbcdae818
19 changed files with 166 additions and 150 deletions

View file

@ -0,0 +1,12 @@
// compile-pass
pub struct GstRc {
_obj: *const (),
_borrowed: bool,
}
const FOO: Option<GstRc> = None;
fn main() {
let _meh = FOO;
}