]> git.proxmox.com Git - rustc.git/blob - src/test/ui/error-codes/E0017.nll.stderr
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / ui / error-codes / E0017.nll.stderr
1 error[E0017]: references in constants may only refer to immutable values
2 --> $DIR/E0017.rs:4:30
3 |
4 LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
5 | ^^^^^^ constants require immutable values
6
7 error[E0017]: references in statics may only refer to immutable values
8 --> $DIR/E0017.rs:5:39
9 |
10 LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
11 | ^^^^^^ statics require immutable values
12
13 error: cannot mutate statics in the initializer of another static
14 --> $DIR/E0017.rs:5:39
15 |
16 LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
17 | ^^^^^^
18
19 error[E0596]: cannot borrow immutable static item `X` as mutable
20 --> $DIR/E0017.rs:5:39
21 |
22 LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
23 | ^^^^^^ cannot borrow as mutable
24
25 error[E0017]: references in statics may only refer to immutable values
26 --> $DIR/E0017.rs:8:38
27 |
28 LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
29 | ^^^^^^ statics require immutable values
30
31 error: aborting due to 5 previous errors
32
33 Some errors occurred: E0017, E0596.
34 For more information about an error, try `rustc --explain E0017`.