Skip to content

Commit

Permalink
Merge pull request rust-lang#828 from pnkfelix/fill-in-gap-in-dropck-…
Browse files Browse the repository at this point in the history
…defn

Fix gap in the text defining the Drop-Check rule.
  • Loading branch information
nikomatsakis committed Feb 11, 2015
2 parents 1119a7d + 8e47bf4 commit 47add4a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions text/0769-sound-generic-drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,12 @@ of type `&'a`/`&'a mut`. This is the "Drop-Check" (aka `dropck`) rule.
The Motivation section alluded to the compiler enforcing a new rule.
Here is a more formal statement of that rule:

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

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

0 comments on commit 47add4a

Please sign in to comment.