rust/tests/ui/recursion/recursive-static-definition.rs
Oli Scherer 73b38c661d Do not allocate a second "background" alloc id for the main allocation of a static.
Instead we re-use the static's alloc id within the interpreter for its initializer to refer to the `Allocation` that only exists within the interpreter.
2024-02-15 10:25:18 +00:00

13 lines
221 B
Rust

pub static FOO: u32 = FOO;
//~^ ERROR could not evaluate static initializer
#[derive(Copy, Clone)]
pub union Foo {
x: u32,
}
pub static BAR: Foo = BAR;
//~^ ERROR could not evaluate static initializer
fn main() {}