rust/tests/ui/recursion/recursive-static-definition.stderr
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

16 lines
572 B
Plaintext

error[E0080]: could not evaluate static initializer
--> $DIR/recursive-static-definition.rs:1:23
|
LL | pub static FOO: u32 = FOO;
| ^^^ encountered static that tried to initialize itself with itself
error[E0080]: could not evaluate static initializer
--> $DIR/recursive-static-definition.rs:9:23
|
LL | pub static BAR: Foo = BAR;
| ^^^ 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`.