]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/field_reassign_with_default.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / field_reassign_with_default.stderr
CommitLineData
f20569fa 1error: field assignment outside of initializer for an instance created with Default::default()
136023e0 2 --> $DIR/field_reassign_with_default.rs:63:5
f20569fa
XL
3 |
4LL | a.i = 42;
5 | ^^^^^^^^^
6 |
7 = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
8note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
136023e0 9 --> $DIR/field_reassign_with_default.rs:62:5
f20569fa
XL
10 |
11LL | let mut a: A = Default::default();
12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14error: field assignment outside of initializer for an instance created with Default::default()
136023e0 15 --> $DIR/field_reassign_with_default.rs:103:5
f20569fa
XL
16 |
17LL | a.j = 43;
18 | ^^^^^^^^^
19 |
20note: consider initializing the variable with `main::A { j: 43, i: 42 }` and removing relevant reassignments
136023e0 21 --> $DIR/field_reassign_with_default.rs:102:5
f20569fa
XL
22 |
23LL | let mut a: A = Default::default();
24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25
26error: field assignment outside of initializer for an instance created with Default::default()
136023e0 27 --> $DIR/field_reassign_with_default.rs:108:5
f20569fa
XL
28 |
29LL | a.i = 42;
30 | ^^^^^^^^^
31 |
32note: consider initializing the variable with `main::A { i: 42, j: 44 }` and removing relevant reassignments
136023e0 33 --> $DIR/field_reassign_with_default.rs:107:5
f20569fa
XL
34 |
35LL | let mut a: A = Default::default();
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
38error: field assignment outside of initializer for an instance created with Default::default()
136023e0 39 --> $DIR/field_reassign_with_default.rs:114:5
f20569fa
XL
40 |
41LL | a.i = 42;
42 | ^^^^^^^^^
43 |
44note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
136023e0 45 --> $DIR/field_reassign_with_default.rs:113:5
f20569fa
XL
46 |
47LL | let mut a = A::default();
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^
49
50error: field assignment outside of initializer for an instance created with Default::default()
136023e0 51 --> $DIR/field_reassign_with_default.rs:124:5
f20569fa
XL
52 |
53LL | a.i = Default::default();
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^
55 |
56note: consider initializing the variable with `main::A { i: Default::default(), ..Default::default() }` and removing relevant reassignments
136023e0 57 --> $DIR/field_reassign_with_default.rs:123:5
f20569fa
XL
58 |
59LL | let mut a: A = Default::default();
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61
62error: field assignment outside of initializer for an instance created with Default::default()
136023e0 63 --> $DIR/field_reassign_with_default.rs:128:5
f20569fa
XL
64 |
65LL | a.i = Default::default();
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^
67 |
68note: consider initializing the variable with `main::A { i: Default::default(), j: 45 }` and removing relevant reassignments
136023e0 69 --> $DIR/field_reassign_with_default.rs:127:5
f20569fa
XL
70 |
71LL | let mut a: A = Default::default();
72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73
74error: field assignment outside of initializer for an instance created with Default::default()
136023e0 75 --> $DIR/field_reassign_with_default.rs:150:5
f20569fa
XL
76 |
77LL | a.i = vec![1];
78 | ^^^^^^^^^^^^^^
79 |
80note: consider initializing the variable with `C { i: vec![1], ..Default::default() }` and removing relevant reassignments
136023e0 81 --> $DIR/field_reassign_with_default.rs:149:5
f20569fa
XL
82 |
83LL | let mut a: C = C::default();
84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
cdc7bbd5 86error: field assignment outside of initializer for an instance created with Default::default()
136023e0 87 --> $DIR/field_reassign_with_default.rs:157:5
cdc7bbd5
XL
88 |
89LL | a.i = true;
90 | ^^^^^^^^^^^
91 |
92note: consider initializing the variable with `Wrapper::<bool> { i: true }` and removing relevant reassignments
136023e0 93 --> $DIR/field_reassign_with_default.rs:156:5
cdc7bbd5
XL
94 |
95LL | let mut a: Wrapper<bool> = Default::default();
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97
98error: field assignment outside of initializer for an instance created with Default::default()
136023e0 99 --> $DIR/field_reassign_with_default.rs:160:5
cdc7bbd5
XL
100 |
101LL | a.i = 42;
102 | ^^^^^^^^^
103 |
104note: consider initializing the variable with `WrapperMulti::<i32, i64> { i: 42, ..Default::default() }` and removing relevant reassignments
136023e0 105 --> $DIR/field_reassign_with_default.rs:159:5
cdc7bbd5
XL
106 |
107LL | let mut a: WrapperMulti<i32, i64> = Default::default();
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109
110error: aborting due to 9 previous errors
f20569fa 111