11warning: attempting to modify a `const` item
2- --> $DIR/lint-const-item-mutation.rs:35 :5
2+ --> $DIR/lint-const-item-mutation.rs:37 :5
33 |
44LL | ARRAY[0] = 5;
55 | ^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | const ARRAY: [u8; 1] = [25];
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414
1515warning: attempting to modify a `const` item
16- --> $DIR/lint-const-item-mutation.rs:36 :5
16+ --> $DIR/lint-const-item-mutation.rs:38 :5
1717 |
1818LL | MY_STRUCT.field = false;
1919 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2727
2828warning: attempting to modify a `const` item
29- --> $DIR/lint-const-item-mutation.rs:37 :5
29+ --> $DIR/lint-const-item-mutation.rs:39 :5
3030 |
3131LL | MY_STRUCT.inner_array[0] = 'b';
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -39,7 +39,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
3939 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4040
4141warning: 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
4343 |
4444LL | MY_STRUCT.use_mut();
4545 | ^^^^^^^^^^^^^^^^^^^
@@ -58,7 +58,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
5858 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5959
6060warning: 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
6262 |
6363LL | &mut MY_STRUCT;
6464 | ^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
7272 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7373
7474warning: 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
7676 |
7777LL | (&mut MY_STRUCT).use_mut();
7878 | ^^^^^^^^^^^^^^^^
@@ -86,7 +86,7 @@ LL | const MY_STRUCT: MyStruct = MyStruct { field: true, inner_array: ['a'], raw
8686 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787
8888warning: attempting to modify a `const` item
89- --> $DIR/lint-const-item-mutation.rs:52 :5
89+ --> $DIR/lint-const-item-mutation.rs:54 :5
9090 |
9191LL | MUTABLE2.msg = "wow";
9292 | ^^^^^^^^^^^^^^^^^^^^
@@ -99,7 +99,7 @@ LL | const MUTABLE2: Mutable2 = Mutable2 { msg: "", other: String::new() };
9999 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100100
101101warning: 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
103103 |
104104LL | VEC.push(0);
105105 | ^^^^^^^^^^^
0 commit comments