File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ error[E0017]: references in constants may only refer to immutable values
4
4
LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
5
5
| ^^^^^^ constants require immutable values
6
6
7
+ error: cannot mutate statics in the initializer of another static
8
+ --> $DIR/E0017.rs:15:39
9
+ |
10
+ LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
11
+ | ^^^^^^
12
+
7
13
error[E0017]: references in statics may only refer to immutable values
8
14
--> $DIR/E0017.rs:15:39
9
15
|
@@ -17,12 +23,12 @@ LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
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:17 :38
26
+ --> $DIR/E0017.rs:18 :38
21
27
|
22
28
LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
23
29
| ^^^^^^ statics require immutable values
24
30
25
- error: aborting due to 4 previous errors
31
+ error: aborting due to 5 previous errors
26
32
27
33
Some errors occurred: E0017, E0596.
28
34
For more information about an error, try `rustc --explain E0017`.
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ error[E0017]: references in constants may only refer to immutable values
4
4
LL | const CR: &'static mut i32 = &mut C; //~ ERROR E0017
5
5
| ^^^^^^ constants require immutable values
6
6
7
+ error: cannot mutate statics in the initializer of another static
8
+ --> $DIR/E0388.rs:15:39
9
+ |
10
+ LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
11
+ | ^^^^^^
12
+
7
13
error[E0017]: references in statics may only refer to immutable values
8
14
--> $DIR/E0388.rs:15:39
9
15
|
@@ -17,12 +23,12 @@ LL | static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
17
23
| ^^^^^^ cannot borrow as mutable
18
24
19
25
error[E0017]: references in statics may only refer to immutable values
20
- --> $DIR/E0388.rs:17 :38
26
+ --> $DIR/E0388.rs:18 :38
21
27
|
22
28
LL | static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
23
29
| ^^^^^^ statics require immutable values
24
30
25
- error: aborting due to 4 previous errors
31
+ error: aborting due to 5 previous errors
26
32
27
33
Some errors occurred: E0017, E0596.
28
34
For more information about an error, try `rustc --explain E0017`.
You can’t perform that action at this time.
0 commit comments