@@ -5,7 +5,7 @@ LL | a.i = 42;
55 | ^^^^^^^^^
66 |
77 = 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
99 --> $DIR/field_reassign_with_default.rs:16:5
1010 |
1111LL | let mut a: A = Default::default();
@@ -17,7 +17,7 @@ error: field assignment outside of initializer for an instance created with Defa
1717LL | a.j = 43;
1818 | ^^^^^^^^^
1919 |
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
2121 --> $DIR/field_reassign_with_default.rs:56:5
2222 |
2323LL | let mut a: A = Default::default();
@@ -29,7 +29,7 @@ error: field assignment outside of initializer for an instance created with Defa
2929LL | a.i = 42;
3030 | ^^^^^^^^^
3131 |
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
3333 --> $DIR/field_reassign_with_default.rs:61:5
3434 |
3535LL | let mut a: A = Default::default();
@@ -41,7 +41,7 @@ error: field assignment outside of initializer for an instance created with Defa
4141LL | a.i = 42;
4242 | ^^^^^^^^^
4343 |
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
4545 --> $DIR/field_reassign_with_default.rs:67:5
4646 |
4747LL | let mut a = A::default();
@@ -53,7 +53,7 @@ error: field assignment outside of initializer for an instance created with Defa
5353LL | a.i = Default::default();
5454 | ^^^^^^^^^^^^^^^^^^^^^^^^^
5555 |
56- note: consider initializing the variable with `A::default()`
56+ note: consider initializing the variable with `A::default()` and removing relevant reassignments
5757 --> $DIR/field_reassign_with_default.rs:77:5
5858 |
5959LL | let mut a: A = Default::default();
@@ -65,7 +65,7 @@ error: field assignment outside of initializer for an instance created with Defa
6565LL | a.i = Default::default();
6666 | ^^^^^^^^^^^^^^^^^^^^^^^^^
6767 |
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
6969 --> $DIR/field_reassign_with_default.rs:81:5
7070 |
7171LL | let mut a: A = Default::default();
0 commit comments