mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-13 15:33:53 +00:00
![Oli Scherer](/assets/img/avatar_default.png)
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() {}
|