]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-eval/union_promotion.rs
During MirBorrowck, ignore ConstEvalCounter
[rust.git] / tests / ui / consts / const-eval / union_promotion.rs
1 #[repr(C)]
2 union Foo {
3     a: &'static u32,
4     b: usize,
5 }
6
7 fn main() {
8     let x: &'static bool = &unsafe { //~ temporary value dropped while borrowed
9         Foo { a: &1 }.b == Foo { a: &2 }.b
10     };
11 }