Skip to content

Commit e06774e

Browse files
committed
Auto merge of #39304 - jrmuizel:drop-flags, r=steveklabnik
Remove obsolete documentation about drop-flags
2 parents 322f0d7 + 4ba6e1b commit e06774e

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/doc/nomicon/src/drop-flags.md

+2-14
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,5 @@ if condition {
7979
}
8080
```
8181

82-
As of Rust 1.0, the drop flags are actually not-so-secretly stashed in a hidden
83-
field of any type that implements Drop. Rust sets the drop flag by overwriting
84-
the entire value with a particular bit pattern. This is pretty obviously Not
85-
The Fastest and causes a bunch of trouble with optimizing code. It's legacy from
86-
a time when you could do much more complex conditional initialization.
87-
88-
As such work is currently under way to move the flags out onto the stack frame
89-
where they more reasonably belong. Unfortunately, this work will take some time
90-
as it requires fairly substantial changes to the compiler.
91-
92-
Regardless, Rust programs don't need to worry about uninitialized values on
93-
the stack for correctness. Although they might care for performance. Thankfully,
94-
Rust makes it easy to take control here! Uninitialized values are there, and
95-
you can work with them in Safe Rust, but you're never in danger.
82+
The drop flags are tracked on the stack and no longer stashed in types that
83+
implement drop.

0 commit comments

Comments
 (0)