We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 866755c commit 20ec7bdCopy full SHA for 20ec7bd
src/destructors.md
@@ -63,10 +63,11 @@ loop {
63
moved = ShowOnDrop("Drops when moved");
64
// drops now, but is then uninitialized
65
moved;
66
+ // Uninitialized does not drop.
67
let uninitialized: ShowOnDrop;
68
// Only first element drops
- let mut partially_initialized: (ShowOnDrop, ShowOnDrop);
69
- partially_initialized.0 = ShowOnDrop("Partial tuple first");
+ let mut partially_initialized = (ShowOnDrop("one"), ShowOnDrop("two"));
70
+ core::mem::forget(partially_initialized.1);
71
}
72
```
73
0 commit comments