2018-12-17 07:20:42 -06:00
|
|
|
error[E0080]: could not evaluate static initializer
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/write-to-static-mut-in-static.rs:2:33
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub static mut B: () = unsafe { A = 1; };
|
2018-12-17 07:20:42 -06:00
|
|
|
| ^^^^^ tried to modify a static's initial value from another static's initializer
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2018-12-17 07:20:42 -06:00
|
|
|
error[E0391]: cycle detected when const-evaluating `C`
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/write-to-static-mut-in-static.rs:5:34
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub static mut C: u32 = unsafe { C = 1; 0 };
|
|
|
|
| ^^^^^
|
2018-12-17 07:20:42 -06:00
|
|
|
|
|
|
|
|
note: ...which requires const-evaluating `C`...
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/write-to-static-mut-in-static.rs:5:1
|
2018-12-17 07:20:42 -06:00
|
|
|
|
|
|
|
|
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`
|
2018-12-28 13:05:22 -06:00
|
|
|
--> $DIR/write-to-static-mut-in-static.rs:5:1
|
2018-12-17 07:20:42 -06:00
|
|
|
|
|
|
|
|
LL | pub static mut C: u32 = unsafe { C = 1; 0 };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-12-17 07:20:42 -06:00
|
|
|
Some errors occurred: E0080, E0391.
|
|
|
|
For more information about an error, try `rustc --explain E0080`.
|