@@ -5,7 +5,7 @@ LL | a.i = 42;
5
5
| ^^^^^^^^^
6
6
|
7
7
= note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
8
- note: consider initializing the variable with `A { i: 42, ..Default::default() }`
8
+ note: consider initializing the variable with `A { i: 42, ..Default::default() }` and removing relevant reassignments
9
9
--> $DIR/field_reassign_with_default.rs:16:5
10
10
|
11
11
LL | let mut a: A = Default::default();
@@ -17,7 +17,7 @@ error: field assignment outside of initializer for an instance created with Defa
17
17
LL | a.j = 43;
18
18
| ^^^^^^^^^
19
19
|
20
- note: consider initializing the variable with `A { j: 43, i: 42 }`
20
+ note: consider initializing the variable with `A { j: 43, i: 42 }` and removing relevant reassignments
21
21
--> $DIR/field_reassign_with_default.rs:56:5
22
22
|
23
23
LL | let mut a: A = Default::default();
@@ -29,7 +29,7 @@ error: field assignment outside of initializer for an instance created with Defa
29
29
LL | a.i = 42;
30
30
| ^^^^^^^^^
31
31
|
32
- note: consider initializing the variable with `A { i: 42, j: 44 }`
32
+ note: consider initializing the variable with `A { i: 42, j: 44 }` and removing relevant reassignments
33
33
--> $DIR/field_reassign_with_default.rs:61:5
34
34
|
35
35
LL | let mut a: A = Default::default();
@@ -41,7 +41,7 @@ error: field assignment outside of initializer for an instance created with Defa
41
41
LL | a.i = 42;
42
42
| ^^^^^^^^^
43
43
|
44
- note: consider initializing the variable with `A { i: 42, ..Default::default() }`
44
+ note: consider initializing the variable with `A { i: 42, ..Default::default() }` and removing relevant reassignments
45
45
--> $DIR/field_reassign_with_default.rs:67:5
46
46
|
47
47
LL | let mut a = A::default();
@@ -53,7 +53,7 @@ error: field assignment outside of initializer for an instance created with Defa
53
53
LL | a.i = Default::default();
54
54
| ^^^^^^^^^^^^^^^^^^^^^^^^^
55
55
|
56
- note: consider initializing the variable with `A::default()`
56
+ note: consider initializing the variable with `A::default()` and removing relevant reassignments
57
57
--> $DIR/field_reassign_with_default.rs:77:5
58
58
|
59
59
LL | let mut a: A = Default::default();
@@ -65,7 +65,7 @@ error: field assignment outside of initializer for an instance created with Defa
65
65
LL | a.i = Default::default();
66
66
| ^^^^^^^^^^^^^^^^^^^^^^^^^
67
67
|
68
- note: consider initializing the variable with `A { j: 45, ..Default::default() }`
68
+ note: consider initializing the variable with `A { j: 45, ..Default::default() }` and removing relevant reassignments
69
69
--> $DIR/field_reassign_with_default.rs:81:5
70
70
|
71
71
LL | let mut a: A = Default::default();
0 commit comments