We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1528956 commit 663b0fbCopy full SHA for 663b0fb
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