|  | 
| 1 | 1 | error[E0017]: references in constants may only refer to immutable values | 
| 2 |  | - --> $DIR/E0017.rs:4:30 | 
|  | 2 | + --> $DIR/E0017.rs:5:30 | 
| 3 | 3 |  | | 
| 4 | 4 | LL | const CR: &'static mut i32 = &mut C; | 
| 5 | 5 |  | ^^^^^^ constants require immutable values | 
| 6 | 6 | 
 | 
|  | 7 | +error[E0019]: static contains unimplemented expression type | 
|  | 8 | + --> $DIR/E0017.rs:6:39 | 
|  | 9 | + | | 
|  | 10 | +LL | static STATIC_REF: &'static mut i32 = &mut X; | 
|  | 11 | + | ^^^^^^ | 
|  | 12 | + | 
| 7 | 13 | error[E0017]: references in statics may only refer to immutable values | 
| 8 |  | - --> $DIR/E0017.rs:5:39 | 
|  | 14 | + --> $DIR/E0017.rs:6:39 | 
| 9 | 15 |  | | 
| 10 | 16 | LL | static STATIC_REF: &'static mut i32 = &mut X; | 
| 11 | 17 |  | ^^^^^^ statics require immutable values | 
| 12 | 18 | 
 | 
| 13 | 19 | error[E0596]: cannot borrow immutable static item `X` as mutable | 
| 14 |  | - --> $DIR/E0017.rs:5:39 | 
|  | 20 | + --> $DIR/E0017.rs:6:39 | 
| 15 | 21 |  | | 
| 16 | 22 | LL | static STATIC_REF: &'static mut i32 = &mut X; | 
| 17 | 23 |  | ^^^^^^ cannot borrow as mutable | 
| 18 | 24 | 
 | 
| 19 | 25 | error[E0017]: references in statics may only refer to immutable values | 
| 20 |  | - --> $DIR/E0017.rs:7:38 | 
|  | 26 | + --> $DIR/E0017.rs:9:38 | 
| 21 | 27 |  | | 
| 22 | 28 | LL | static CONST_REF: &'static mut i32 = &mut C; | 
| 23 | 29 |  | ^^^^^^ statics require immutable values | 
| 24 | 30 | 
 | 
| 25 |  | -error: aborting due to 4 previous errors | 
|  | 31 | +error[E0017]: references in statics may only refer to immutable values | 
|  | 32 | + --> $DIR/E0017.rs:10:52 | 
|  | 33 | + | | 
|  | 34 | +LL | static STATIC_MUT_REF: &'static mut i32 = unsafe { &mut M }; | 
|  | 35 | + | ^^^^^^ statics require immutable values | 
|  | 36 | + | 
|  | 37 | +error: aborting due to 6 previous errors | 
| 26 | 38 | 
 | 
| 27 |  | -Some errors have detailed explanations: E0017, E0596. | 
|  | 39 | +Some errors have detailed explanations: E0017, E0019, E0596. | 
| 28 | 40 | For more information about an error, try `rustc --explain E0017`. | 
0 commit comments