rust/tests/ui/recursion/recursive-static-definition.rs

13 lines
271 B
Rust

pub static FOO: u32 = FOO;
//~^ ERROR encountered static that tried to initialize itself with itself
#[derive(Copy, Clone)]
pub union Foo {
x: u32,
}
pub static BAR: Foo = BAR;
//~^ ERROR encountered static that tried to initialize itself with itself
fn main() {}