Skip to content

Commit e1aba75

Browse files
committed
review comment: point out that the dropck analysis is now trivial.
1 parent b6a4f03 commit e1aba75

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/doc/nomicon/dropck.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,13 @@ strictly outlive that value.
186186
The precise rules that govern drop checking may be less restrictive in
187187
the future.
188188

189-
The current analysis is deliberately conservative; forcing all
190-
borrowed data in a value to outlive that value is certainly sound.
189+
The current analysis is deliberately conservative and trivial; it forces all
190+
borrowed data in a value to outlive that value, which is certainly sound.
191191

192-
Future versions of the language may improve its precision (i.e. to
193-
reduce the number of cases where sound code is rejected as unsafe).
192+
Future versions of the language may make the analysis more precise, to
193+
reduce the number of cases where sound code is rejected as unsafe.
194+
This would help address cases such as the two Inspectors above that
195+
know not to inspect during destruction.
194196

195197
In the meantime, there is an unstable attribute that one can use to
196198
assert (unsafely) that a generic type's destructor is *guaranteed* to

0 commit comments

Comments
 (0)