blob: d9f458f3770a81c7d169ee9d5589c39dcc1f64fb [file] [log] [blame]
// https://github.com/rust-lang/rust/issues/55223
union Foo<'a> {
y: &'a (),
long_live_the_unit: &'static (),
}
const FOO: &() = {
//~^ ERROR encountered dangling pointer in final value of constant
let y = ();
unsafe { Foo { y: &y }.long_live_the_unit }
};
fn main() {}