Skip to content

Commit 47add4a

Browse files
committed
Merge pull request rust-lang#828 from pnkfelix/fill-in-gap-in-dropck-defn
Fix gap in the text defining the Drop-Check rule.
2 parents 1119a7d + 8e47bf4 commit 47add4a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

text/0769-sound-generic-drop.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ of type `&'a`/`&'a mut`. This is the "Drop-Check" (aka `dropck`) rule.
247247
The Motivation section alluded to the compiler enforcing a new rule.
248248
Here is a more formal statement of that rule:
249249

250-
Let `v` be some value (either temporary or named); if the type of `v` owns data of type `D`,
251-
where `D` has a lifetime- or type-parametric `Drop` implementation and
252-
either:
250+
Let `v` be some value (either temporary or named)
251+
and `'a` be some lifetime (scope);
252+
if the type of `v` owns data of type `D`, where
253+
(1.) `D` has a lifetime- or type-parametric `Drop` implementation, and
254+
(2.) the structure of `D` can reach a reference of type `&'a _`, and
255+
(3.) either:
253256

254257
* (A.) the `Drop impl` for `D` instantiates `D` at `'a`
255258
directly, i.e. `D<'a>`, or,

0 commit comments

Comments
 (0)