2019-10-31 16:02:02 +00:00
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:63:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | a.i = 42;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
|
2021-01-05 19:11:37 +00:00
|
|
|
note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:62:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: A = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:103:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | a.j = 43;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-01-05 19:11:37 +00:00
|
|
|
note: consider initializing the variable with `main::A { j: 43, i: 42 }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:102:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: A = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:108:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | a.i = 42;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-01-05 19:11:37 +00:00
|
|
|
note: consider initializing the variable with `main::A { i: 42, j: 44 }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:107:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: A = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:114:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | a.i = 42;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-01-05 19:11:37 +00:00
|
|
|
note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:113:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | let mut a = A::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:124:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | a.i = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-01-05 19:11:37 +00:00
|
|
|
note: consider initializing the variable with `main::A { i: Default::default(), ..Default::default() }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:123:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: A = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:128:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | a.i = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-01-05 19:11:37 +00:00
|
|
|
note: consider initializing the variable with `main::A { i: Default::default(), j: 45 }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:127:5
|
2019-10-31 16:02:02 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: A = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-01-01 15:59:59 +00:00
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:150:5
|
2021-01-01 15:59:59 +00:00
|
|
|
|
|
|
|
|
LL | a.i = vec![1];
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: consider initializing the variable with `C { i: vec![1], ..Default::default() }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:149:5
|
2021-01-01 15:59:59 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: C = C::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-03-21 08:50:35 +00:00
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:157:5
|
2021-03-21 08:50:35 +00:00
|
|
|
|
|
|
|
|
LL | a.i = true;
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: consider initializing the variable with `Wrapper::<bool> { i: true }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:156:5
|
2021-03-21 08:50:35 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: Wrapper<bool> = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: field assignment outside of initializer for an instance created with Default::default()
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:160:5
|
2021-03-21 08:50:35 +00:00
|
|
|
|
|
|
|
|
LL | a.i = 42;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: consider initializing the variable with `WrapperMulti::<i32, i64> { i: 42, ..Default::default() }` and removing relevant reassignments
|
2021-05-04 14:48:25 +00:00
|
|
|
--> $DIR/field_reassign_with_default.rs:159:5
|
2021-03-21 08:50:35 +00:00
|
|
|
|
|
|
|
|
LL | let mut a: WrapperMulti<i32, i64> = Default::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2019-10-31 16:02:02 +00:00
|
|
|
|