diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-10-09 14:08:06 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-10-09 14:08:06 +0200 |
| commit | e1aba75a978b7a228c2e5c413e2262e24b74141f (patch) | |
| tree | a5e24d45528ee7ce05f1e4716541c51ec831331c | |
| parent | b6a4f0393bfc76f68aa3c9a5b86dd1f7aee5c08c (diff) | |
| download | rust-e1aba75a978b7a228c2e5c413e2262e24b74141f.tar.gz rust-e1aba75a978b7a228c2e5c413e2262e24b74141f.zip | |
review comment: point out that the dropck analysis is now trivial.
| -rw-r--r-- | src/doc/nomicon/dropck.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/doc/nomicon/dropck.md b/src/doc/nomicon/dropck.md index 5b83433ba3e..7c097c91266 100644 --- a/src/doc/nomicon/dropck.md +++ b/src/doc/nomicon/dropck.md @@ -186,11 +186,13 @@ strictly outlive that value. The precise rules that govern drop checking may be less restrictive in the future. -The current analysis is deliberately conservative; forcing all -borrowed data in a value to outlive that value is certainly sound. +The current analysis is deliberately conservative and trivial; it forces all +borrowed data in a value to outlive that value, which is certainly sound. -Future versions of the language may improve its precision (i.e. to -reduce the number of cases where sound code is rejected as unsafe). +Future versions of the language may make the analysis more precise, to +reduce the number of cases where sound code is rejected as unsafe. +This would help address cases such as the two Inspectors above that +know not to inspect during destruction. In the meantime, there is an unstable attribute that one can use to assert (unsafely) that a generic type's destructor is *guaranteed* to |
