2018-06-03 19:47:19 +01:00
|
|
|
pub static mut A: u32 = 0;
|
|
|
|
|
pub static mut B: () = unsafe { A = 1; };
|
2025-05-28 10:29:08 +00:00
|
|
|
//~^ ERROR modifying a static's initial value
|
2018-06-03 19:47:19 +01:00
|
|
|
|
|
|
|
|
pub static mut C: u32 = unsafe { C = 1; 0 };
|
2025-06-27 12:47:47 +02:00
|
|
|
//~^ ERROR static that tried to access itself during initialization
|
2018-06-03 19:47:19 +01:00
|
|
|
|
|
|
|
|
pub static D: u32 = D;
|
2025-06-27 12:47:47 +02:00
|
|
|
//~^ ERROR static that tried to access itself during initialization
|
2018-06-03 19:47:19 +01:00
|
|
|
|
|
|
|
|
fn main() {}
|