From a8362b6890cc8c77462423d183e7fb110bcc556f 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. --- dropck.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dropck.md b/dropck.md index 5b83433..7c097c9 100644 --- a/dropck.md +++ b/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