blob: 695d33b6908984b4c7e6874c1b1965c51aaa2447 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// https://github.com/rust-lang/rust/issues/55223
#![feature(const_let)]
union Foo<'a> {
y: &'a (),
long_live_the_unit: &'static (),
}
const FOO: &() = { //~ ERROR any use of this value will cause an error
let y = ();
unsafe { Foo { y: &y }.long_live_the_unit }
};
fn main() {}
|