mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
73b38c661d
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.
13 lines
221 B
Rust
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() {}
|