mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +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.
16 lines
601 B
Plaintext
16 lines
601 B
Plaintext
error[E0080]: could not evaluate static initializer
|
|
--> $DIR/write-to-static-mut-in-static.rs:2:33
|
|
|
|
|
LL | pub static mut B: () = unsafe { A = 1; };
|
|
| ^^^^^ modifying a static's initial value from another static's initializer
|
|
|
|
error[E0080]: could not evaluate static initializer
|
|
--> $DIR/write-to-static-mut-in-static.rs:7:21
|
|
|
|
|
LL | pub static D: u32 = D;
|
|
| ^ encountered static that tried to initialize itself with itself
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0080`.
|