1 error: field assignment outside of initializer for an instance created with Default::default()
2 --> $DIR/field_reassign_with_default.rs:63:5
7 note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
8 --> $DIR/field_reassign_with_default.rs:62:5
10 LL | let mut a: A = Default::default();
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
14 error: field assignment outside of initializer for an instance created with Default::default()
15 --> $DIR/field_reassign_with_default.rs:103:5
20 note: consider initializing the variable with `main::A { j: 43, i: 42 }` and removing relevant reassignments
21 --> $DIR/field_reassign_with_default.rs:102:5
23 LL | let mut a: A = Default::default();
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 error: field assignment outside of initializer for an instance created with Default::default()
27 --> $DIR/field_reassign_with_default.rs:108:5
32 note: consider initializing the variable with `main::A { i: 42, j: 44 }` and removing relevant reassignments
33 --> $DIR/field_reassign_with_default.rs:107:5
35 LL | let mut a: A = Default::default();
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 error: field assignment outside of initializer for an instance created with Default::default()
39 --> $DIR/field_reassign_with_default.rs:114:5
44 note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
45 --> $DIR/field_reassign_with_default.rs:113:5
47 LL | let mut a = A::default();
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^
50 error: field assignment outside of initializer for an instance created with Default::default()
51 --> $DIR/field_reassign_with_default.rs:124:5
53 LL | a.i = Default::default();
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^
56 note: consider initializing the variable with `main::A { i: Default::default(), ..Default::default() }` and removing relevant reassignments
57 --> $DIR/field_reassign_with_default.rs:123:5
59 LL | let mut a: A = Default::default();
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 error: field assignment outside of initializer for an instance created with Default::default()
63 --> $DIR/field_reassign_with_default.rs:128:5
65 LL | a.i = Default::default();
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^
68 note: consider initializing the variable with `main::A { i: Default::default(), j: 45 }` and removing relevant reassignments
69 --> $DIR/field_reassign_with_default.rs:127:5
71 LL | let mut a: A = Default::default();
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74 error: field assignment outside of initializer for an instance created with Default::default()
75 --> $DIR/field_reassign_with_default.rs:150:5
80 note: consider initializing the variable with `C { i: vec![1], ..Default::default() }` and removing relevant reassignments
81 --> $DIR/field_reassign_with_default.rs:149:5
83 LL | let mut a: C = C::default();
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
86 error: field assignment outside of initializer for an instance created with Default::default()
87 --> $DIR/field_reassign_with_default.rs:157:5
92 note: consider initializing the variable with `Wrapper::<bool> { i: true }` and removing relevant reassignments
93 --> $DIR/field_reassign_with_default.rs:156:5
95 LL | let mut a: Wrapper<bool> = Default::default();
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98 error: field assignment outside of initializer for an instance created with Default::default()
99 --> $DIR/field_reassign_with_default.rs:160:5
104 note: consider initializing the variable with `WrapperMulti::<i32, i64> { i: 42, ..Default::default() }` and removing relevant reassignments
105 --> $DIR/field_reassign_with_default.rs:159:5
107 LL | let mut a: WrapperMulti<i32, i64> = Default::default();
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110 error: field assignment outside of initializer for an instance created with Default::default()
111 --> $DIR/field_reassign_with_default.rs:229:13
113 LL | f.name = name.len();
114 | ^^^^^^^^^^^^^^^^^^^^
116 note: consider initializing the variable with `issue6312::ImplDropAllCopy { name: name.len(), ..Default::default() }` and removing relevant reassignments
117 --> $DIR/field_reassign_with_default.rs:228:13
119 LL | let mut f = ImplDropAllCopy::default();
120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 error: field assignment outside of initializer for an instance created with Default::default()
123 --> $DIR/field_reassign_with_default.rs:245:13
125 LL | f.name = name.len();
126 | ^^^^^^^^^^^^^^^^^^^^
128 note: consider initializing the variable with `issue6312::NoDropAllCopy { name: name.len(), ..Default::default() }` and removing relevant reassignments
129 --> $DIR/field_reassign_with_default.rs:244:13
131 LL | let mut f = NoDropAllCopy::default();
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134 error: aborting due to 11 previous errors