]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/union_promotion.rs
Rollup merge of #80733 - steffahn:prettify_pin_links, r=jyn514
[rust.git] / src / test / ui / consts / const-eval / union_promotion.rs
1 #![allow(const_err)]
2
3 #[repr(C)]
4 union Foo {
5     a: &'static u32,
6     b: usize,
7 }
8
9 fn main() {
10     let x: &'static bool = &unsafe { //~ temporary value dropped while borrowed
11         Foo { a: &1 }.b == Foo { a: &2 }.b
12     };
13 }