From 784685cc489eca30134964a73832d2bc6e60b714 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sat, 7 May 2022 03:31:25 +0200 Subject: [PATCH] Introduce and avoid dropck (#353) --- src/dropck.md | 6 +++--- src/phantom-data.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dropck.md b/src/dropck.md index 28b65c1..7594021 100644 --- a/src/dropck.md +++ b/src/dropck.md @@ -121,9 +121,9 @@ Interestingly, only generic types need to worry about this. If they aren't generic, then the only lifetimes they can harbor are `'static`, which will truly live _forever_. This is why this problem is referred to as _sound generic drop_. Sound generic drop is enforced by the _drop checker_. As of this writing, some -of the finer details of how the drop checker validates types is totally up in -the air. However The Big Rule is the subtlety that we have focused on this whole -section: +of the finer details of how the drop checker (also called dropck) validates +types is totally up in the air. However The Big Rule is the subtlety that we +have focused on this whole section: **For a generic type to soundly implement drop, its generics arguments must strictly outlive it.** diff --git a/src/phantom-data.md b/src/phantom-data.md index a5e88bb..726f7ba 100644 --- a/src/phantom-data.md +++ b/src/phantom-data.md @@ -64,9 +64,9 @@ about Vec dropping any T's in its destructor for determining drop check soundness. This will in turn allow people to create unsoundness using Vec's destructor. -In order to tell dropck that we *do* own values of type T, and therefore may -drop some T's when *we* drop, we must add an extra `PhantomData` saying exactly -that: +In order to tell the drop checker that we *do* own values of type T, and +therefore may drop some T's when *we* drop, we must add an extra `PhantomData` +saying exactly that: ```rust use std::marker;