File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,27 @@ Book:
138
138
https://doc.rust-lang.org/book/ownership.html
139
139
"## ,
140
140
141
+ E0383 : r##"
142
+ This error occurs when an attempt is made to partially reinitialize a
143
+ structure that is currently uninitialized.
144
+
145
+ For example, this can happen when a drop has taken place:
146
+
147
+ ```
148
+ let mut x = Foo { a: 1 };
149
+ drop(x); // `x` is now uninitialized
150
+ x.a = 2; // error, partial reinitialization of uninitialized structure `t`
151
+ ```
152
+
153
+ This error can be fixed by fully reinitializing the structure in question:
154
+
155
+ ```
156
+ let mut x = Foo { a: 1 };
157
+ drop(x);
158
+ x = Foo { a: 2 };
159
+ ```
160
+ "## ,
161
+
141
162
E0384 : r##"
142
163
This error occurs when an attempt is made to reassign an immutable variable.
143
164
For example:
@@ -217,7 +238,6 @@ https://doc.rust-lang.org/std/cell/
217
238
}
218
239
219
240
register_diagnostics ! {
220
- E0383 , // partial reinitialization of uninitialized structure
221
241
E0385 , // {} in an aliasable location
222
242
E0386 , // {} in an immutable container
223
243
E0388 , // {} in a static location
You can’t perform that action at this time.
0 commit comments