rust/src/test/ui/write-to-static-mut-in-static.stderr
2018-12-25 21:08:33 -07:00

29 lines
1.1 KiB
Plaintext

error[E0080]: could not evaluate static initializer
--> $DIR/write-to-static-mut-in-static.rs:4:33
|
LL | pub static mut B: () = unsafe { A = 1; };
| ^^^^^ tried to modify a static's initial value from another static's initializer
error[E0391]: cycle detected when const-evaluating `C`
--> $DIR/write-to-static-mut-in-static.rs:7:34
|
LL | pub static mut C: u32 = unsafe { C = 1; 0 };
| ^^^^^
|
note: ...which requires const-evaluating `C`...
--> $DIR/write-to-static-mut-in-static.rs:7:1
|
LL | pub static mut C: u32 = unsafe { C = 1; 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires const-evaluating `C`, completing the cycle
note: cycle used when const-evaluating + checking `C`
--> $DIR/write-to-static-mut-in-static.rs:7:1
|
LL | pub static mut C: u32 = unsafe { C = 1; 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
Some errors occurred: E0080, E0391.
For more information about an error, try `rustc --explain E0080`.