Skip to content

Commit 784685c

Browse files
Introduce and avoid dropck (#353)
1 parent 45a76e8 commit 784685c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/dropck.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ Interestingly, only generic types need to worry about this. If they aren't
121121
generic, then the only lifetimes they can harbor are `'static`, which will truly
122122
live _forever_. This is why this problem is referred to as _sound generic drop_.
123123
Sound generic drop is enforced by the _drop checker_. As of this writing, some
124-
of the finer details of how the drop checker validates types is totally up in
125-
the air. However The Big Rule is the subtlety that we have focused on this whole
126-
section:
124+
of the finer details of how the drop checker (also called dropck) validates
125+
types is totally up in the air. However The Big Rule is the subtlety that we
126+
have focused on this whole section:
127127

128128
**For a generic type to soundly implement drop, its generics arguments must
129129
strictly outlive it.**

src/phantom-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ about Vec dropping any T's in its destructor for determining drop check
6464
soundness. This will in turn allow people to create unsoundness using
6565
Vec's destructor.
6666

67-
In order to tell dropck that we *do* own values of type T, and therefore may
68-
drop some T's when *we* drop, we must add an extra `PhantomData` saying exactly
69-
that:
67+
In order to tell the drop checker that we *do* own values of type T, and
68+
therefore may drop some T's when *we* drop, we must add an extra `PhantomData`
69+
saying exactly that:
7070

7171
```rust
7272
use std::marker;

0 commit comments

Comments
 (0)