1
1
warning: attempting to modify a `const` item
2
- --> $DIR/lint-const-item-mutation.rs:35 :5
2
+ --> $DIR/lint-const-item-mutation.rs:37 :5
3
3
|
4
4
LL | ARRAY[0] = 5;
5
5
| ^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | const ARRAY: [u8; 1] = [25];
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
14
15
15
warning: attempting to modify a `const` item
16
- --> $DIR/lint-const-item-mutation.rs:36 :5
16
+ --> $DIR/lint-const-item-mutation.rs:38 :5
17
17
|
18
18
LL | MY_STRUCT.field = false;
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
27
28
28
warning: attempting to modify a `const` item
29
- --> $DIR/lint-const-item-mutation.rs:37 :5
29
+ --> $DIR/lint-const-item-mutation.rs:39 :5
30
30
|
31
31
LL | MY_STRUCT.inner_array[0] = 'b';
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
39
39
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40
40
41
41
warning: taking a mutable reference to a `const` item
42
- --> $DIR/lint-const-item-mutation.rs:38 :5
42
+ --> $DIR/lint-const-item-mutation.rs:40 :5
43
43
|
44
44
LL | MY_STRUCT.use_mut();
45
45
| ^^^^^^^^^^^^^^^^^^^
@@ -58,7 +58,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
58
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59
59
60
60
warning: taking a mutable reference to a `const` item
61
- --> $DIR/lint-const-item-mutation.rs:39 :5
61
+ --> $DIR/lint-const-item-mutation.rs:41 :5
62
62
|
63
63
LL | &mut MY_STRUCT;
64
64
| ^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
72
72
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
73
74
74
warning: taking a mutable reference to a `const` item
75
- --> $DIR/lint-const-item-mutation.rs:40 :5
75
+ --> $DIR/lint-const-item-mutation.rs:42 :5
76
76
|
77
77
LL | (&mut MY_STRUCT).use_mut();
78
78
| ^^^^^^^^^^^^^^^^
@@ -86,7 +86,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
86
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
87
87
88
88
warning: attempting to modify a `const` item
89
- --> $DIR/lint-const-item-mutation.rs:52 :5
89
+ --> $DIR/lint-const-item-mutation.rs:54 :5
90
90
|
91
91
LL | MUTABLE2.msg = "wow";
92
92
| ^^^^^^^^^^^^^^^^^^^^
@@ -99,7 +99,7 @@ LL | const MUTABLE2: Mutable2 = Mutable2 { msg: "", other: String::new() };
99
99
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100
100
101
101
warning: taking a mutable reference to a `const` item
102
- --> $DIR/lint-const-item-mutation.rs:53 :5
102
+ --> $DIR/lint-const-item-mutation.rs:55 :5
103
103
|
104
104
LL | VEC.push(0);
105
105
| ^^^^^^^^^^^
0 commit comments