From e1aba75a978b7a228c2e5c413e2262e24b74141f Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 9 Oct 2015 14:08:06 +0200 Subject: [PATCH] review comment: point out that the dropck analysis is now trivial. --- src/doc/nomicon/dropck.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/doc/nomicon/dropck.md b/src/doc/nomicon/dropck.md index 5b83433ba3e02..7c097c9126679 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