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:
commit
7cbcdae818
19 changed files with 166 additions and 150 deletions
12
src/test/ui/issues/issue-54387.rs
Normal file
12
src/test/ui/issues/issue-54387.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// compile-pass
|
||||
|
||||
pub struct GstRc {
|
||||
_obj: *const (),
|
||||
_borrowed: bool,
|
||||
}
|
||||
|
||||
const FOO: Option<GstRc> = None;
|
||||
|
||||
fn main() {
|
||||
let _meh = FOO;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue