mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
12 lines
205 B
Rust
12 lines
205 B
Rust
#[repr(C)]
|
|
union Foo {
|
|
a: &'static u32,
|
|
b: usize,
|
|
}
|
|
|
|
fn main() {
|
|
let x: &'static bool = &unsafe { //~ temporary value dropped while borrowed
|
|
Foo { a: &1 }.b == Foo { a: &2 }.b
|
|
};
|
|
}
|