]> git.proxmox.com Git - rustc.git/blob - src/test/ui/write-to-static-mut-in-static.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / write-to-static-mut-in-static.stderr
1 error[E0080]: could not evaluate static initializer
2 --> $DIR/write-to-static-mut-in-static.rs:2:33
3 |
4 LL | pub static mut B: () = unsafe { A = 1; };
5 | ^^^^^ modifying a static's initial value from another static's initializer
6
7 error[E0391]: cycle detected when const-evaluating + checking `C`
8 --> $DIR/write-to-static-mut-in-static.rs:5:1
9 |
10 LL | pub static mut C: u32 = unsafe { C = 1; 0 };
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |
13 note: ...which requires const-evaluating + checking `C`...
14 --> $DIR/write-to-static-mut-in-static.rs:5:1
15 |
16 LL | pub static mut C: u32 = unsafe { C = 1; 0 };
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 = note: ...which again requires const-evaluating + checking `C`, completing the cycle
19 = note: cycle used when running analysis passes on this crate
20
21 error: aborting due to 2 previous errors
22
23 Some errors have detailed explanations: E0080, E0391.
24 For more information about an error, try `rustc --explain E0080`.