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
|
|
};
|
|
}
|