1 error[E0017]: references in constants may only refer to immutable values
4 LL | const CR: &'static mut i32 = &mut C;
5 | ^^^^^^ constants require immutable values
7 error[E0017]: references in statics may only refer to immutable values
10 LL | static STATIC_REF: &'static mut i32 = &mut X;
11 | ^^^^^^ statics require immutable values
13 error: cannot mutate statics in the initializer of another static
14 --> $DIR/E0388.rs:5:39
16 LL | static STATIC_REF: &'static mut i32 = &mut X;
19 error[E0596]: cannot borrow immutable static item `X` as mutable
20 --> $DIR/E0388.rs:5:39
22 LL | static STATIC_REF: &'static mut i32 = &mut X;
23 | ^^^^^^ cannot borrow as mutable
25 error[E0017]: references in statics may only refer to immutable values
26 --> $DIR/E0388.rs:8:38
28 LL | static CONST_REF: &'static mut i32 = &mut C;
29 | ^^^^^^ statics require immutable values
31 error: aborting due to 5 previous errors
33 Some errors have detailed explanations: E0017, E0596.
34 For more information about an error, try `rustc --explain E0017`.