|
1 | 1 | error: field assignment outside of initializer for an instance created with Default::default()
|
2 |
| - --> tests/ui/field_reassign_with_default.rs:56:5 |
| 2 | + --> tests/ui/field_reassign_with_default.rs:57:5 |
3 | 3 | |
|
4 | 4 | LL | a.i = 42;
|
5 | 5 | | ^^^^^^^^^
|
6 | 6 | |
|
7 | 7 | note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
|
8 |
| - --> tests/ui/field_reassign_with_default.rs:55:5 |
| 8 | + --> tests/ui/field_reassign_with_default.rs:56:5 |
9 | 9 | |
|
10 | 10 | LL | let mut a: A = Default::default();
|
11 | 11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
12 | 12 | = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
|
13 | 13 | = help: to override `-D warnings` add `#[allow(clippy::field_reassign_with_default)]`
|
14 | 14 |
|
15 | 15 | error: field assignment outside of initializer for an instance created with Default::default()
|
16 |
| - --> tests/ui/field_reassign_with_default.rs:96:5 |
| 16 | + --> tests/ui/field_reassign_with_default.rs:97:5 |
17 | 17 | |
|
18 | 18 | LL | a.j = 43;
|
19 | 19 | | ^^^^^^^^^
|
20 | 20 | |
|
21 | 21 | note: consider initializing the variable with `main::A { j: 43, i: 42 }` and removing relevant reassignments
|
22 |
| - --> tests/ui/field_reassign_with_default.rs:95:5 |
| 22 | + --> tests/ui/field_reassign_with_default.rs:96:5 |
23 | 23 | |
|
24 | 24 | LL | let mut a: A = Default::default();
|
25 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
26 | 26 |
|
27 | 27 | error: field assignment outside of initializer for an instance created with Default::default()
|
28 |
| - --> tests/ui/field_reassign_with_default.rs:101:5 |
| 28 | + --> tests/ui/field_reassign_with_default.rs:102:5 |
29 | 29 | |
|
30 | 30 | LL | a.i = 42;
|
31 | 31 | | ^^^^^^^^^
|
32 | 32 | |
|
33 | 33 | note: consider initializing the variable with `main::A { i: 42, j: 44 }` and removing relevant reassignments
|
34 |
| - --> tests/ui/field_reassign_with_default.rs:100:5 |
| 34 | + --> tests/ui/field_reassign_with_default.rs:101:5 |
35 | 35 | |
|
36 | 36 | LL | let mut a: A = Default::default();
|
37 | 37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
38 | 38 |
|
39 | 39 | error: field assignment outside of initializer for an instance created with Default::default()
|
40 |
| - --> tests/ui/field_reassign_with_default.rs:107:5 |
| 40 | + --> tests/ui/field_reassign_with_default.rs:108:5 |
41 | 41 | |
|
42 | 42 | LL | a.i = 42;
|
43 | 43 | | ^^^^^^^^^
|
44 | 44 | |
|
45 | 45 | note: consider initializing the variable with `main::A { i: 42, ..Default::default() }` and removing relevant reassignments
|
46 |
| - --> tests/ui/field_reassign_with_default.rs:106:5 |
| 46 | + --> tests/ui/field_reassign_with_default.rs:107:5 |
47 | 47 | |
|
48 | 48 | LL | let mut a = A::default();
|
49 | 49 | | ^^^^^^^^^^^^^^^^^^^^^^^^^
|
50 | 50 |
|
51 | 51 | error: field assignment outside of initializer for an instance created with Default::default()
|
52 |
| - --> tests/ui/field_reassign_with_default.rs:117:5 |
| 52 | + --> tests/ui/field_reassign_with_default.rs:118:5 |
53 | 53 | |
|
54 | 54 | LL | a.i = Default::default();
|
55 | 55 | | ^^^^^^^^^^^^^^^^^^^^^^^^^
|
56 | 56 | |
|
57 | 57 | note: consider initializing the variable with `main::A { i: Default::default(), ..Default::default() }` and removing relevant reassignments
|
58 |
| - --> tests/ui/field_reassign_with_default.rs:116:5 |
| 58 | + --> tests/ui/field_reassign_with_default.rs:117:5 |
59 | 59 | |
|
60 | 60 | LL | let mut a: A = Default::default();
|
61 | 61 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
62 | 62 |
|
63 | 63 | error: field assignment outside of initializer for an instance created with Default::default()
|
64 |
| - --> tests/ui/field_reassign_with_default.rs:121:5 |
| 64 | + --> tests/ui/field_reassign_with_default.rs:122:5 |
65 | 65 | |
|
66 | 66 | LL | a.i = Default::default();
|
67 | 67 | | ^^^^^^^^^^^^^^^^^^^^^^^^^
|
68 | 68 | |
|
69 | 69 | note: consider initializing the variable with `main::A { i: Default::default(), j: 45 }` and removing relevant reassignments
|
70 |
| - --> tests/ui/field_reassign_with_default.rs:120:5 |
| 70 | + --> tests/ui/field_reassign_with_default.rs:121:5 |
71 | 71 | |
|
72 | 72 | LL | let mut a: A = Default::default();
|
73 | 73 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
74 | 74 |
|
75 | 75 | error: field assignment outside of initializer for an instance created with Default::default()
|
76 |
| - --> tests/ui/field_reassign_with_default.rs:143:5 |
| 76 | + --> tests/ui/field_reassign_with_default.rs:144:5 |
77 | 77 | |
|
78 | 78 | LL | a.i = vec![1];
|
79 | 79 | | ^^^^^^^^^^^^^^
|
80 | 80 | |
|
81 | 81 | note: consider initializing the variable with `C { i: vec![1], ..Default::default() }` and removing relevant reassignments
|
82 |
| - --> tests/ui/field_reassign_with_default.rs:142:5 |
| 82 | + --> tests/ui/field_reassign_with_default.rs:143:5 |
83 | 83 | |
|
84 | 84 | LL | let mut a: C = C::default();
|
85 | 85 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
86 | 86 |
|
87 | 87 | error: field assignment outside of initializer for an instance created with Default::default()
|
88 |
| - --> tests/ui/field_reassign_with_default.rs:161:5 |
| 88 | + --> tests/ui/field_reassign_with_default.rs:162:5 |
89 | 89 | |
|
90 | 90 | LL | a.i = true;
|
91 | 91 | | ^^^^^^^^^^^
|
92 | 92 | |
|
93 | 93 | note: consider initializing the variable with `Wrapper::<bool> { i: true }` and removing relevant reassignments
|
94 |
| - --> tests/ui/field_reassign_with_default.rs:160:5 |
| 94 | + --> tests/ui/field_reassign_with_default.rs:161:5 |
95 | 95 | |
|
96 | 96 | LL | let mut a: Wrapper<bool> = Default::default();
|
97 | 97 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
98 | 98 |
|
99 | 99 | error: field assignment outside of initializer for an instance created with Default::default()
|
100 |
| - --> tests/ui/field_reassign_with_default.rs:164:5 |
| 100 | + --> tests/ui/field_reassign_with_default.rs:165:5 |
101 | 101 | |
|
102 | 102 | LL | a.i = 42;
|
103 | 103 | | ^^^^^^^^^
|
104 | 104 | |
|
105 | 105 | note: consider initializing the variable with `WrapperMulti::<i32, i64> { i: 42, ..Default::default() }` and removing relevant reassignments
|
106 |
| - --> tests/ui/field_reassign_with_default.rs:163:5 |
| 106 | + --> tests/ui/field_reassign_with_default.rs:164:5 |
107 | 107 | |
|
108 | 108 | LL | let mut a: WrapperMulti<i32, i64> = Default::default();
|
109 | 109 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
110 | 110 |
|
111 | 111 | error: field assignment outside of initializer for an instance created with Default::default()
|
112 |
| - --> tests/ui/field_reassign_with_default.rs:235:13 |
| 112 | + --> tests/ui/field_reassign_with_default.rs:236:13 |
113 | 113 | |
|
114 | 114 | LL | f.name = name.len();
|
115 | 115 | | ^^^^^^^^^^^^^^^^^^^^
|
116 | 116 | |
|
117 | 117 | note: consider initializing the variable with `issue6312::ImplDropAllCopy { name: name.len(), ..Default::default() }` and removing relevant reassignments
|
118 |
| - --> tests/ui/field_reassign_with_default.rs:234:13 |
| 118 | + --> tests/ui/field_reassign_with_default.rs:235:13 |
119 | 119 | |
|
120 | 120 | LL | let mut f = ImplDropAllCopy::default();
|
121 | 121 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
122 | 122 |
|
123 | 123 | error: field assignment outside of initializer for an instance created with Default::default()
|
124 |
| - --> tests/ui/field_reassign_with_default.rs:251:13 |
| 124 | + --> tests/ui/field_reassign_with_default.rs:252:13 |
125 | 125 | |
|
126 | 126 | LL | f.name = name.len();
|
127 | 127 | | ^^^^^^^^^^^^^^^^^^^^
|
128 | 128 | |
|
129 | 129 | note: consider initializing the variable with `issue6312::NoDropAllCopy { name: name.len(), ..Default::default() }` and removing relevant reassignments
|
130 |
| - --> tests/ui/field_reassign_with_default.rs:250:13 |
| 130 | + --> tests/ui/field_reassign_with_default.rs:251:13 |
131 | 131 | |
|
132 | 132 | LL | let mut f = NoDropAllCopy::default();
|
133 | 133 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
0 commit comments