about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-06-15 12:28:07 -0400
committerGitHub <noreply@github.com>2017-06-15 12:28:07 -0400
commite4baa26d2a24845bb960a9a51fa3c4ecf63bdd4a (patch)
treeafecccd2293b12c3f082e51d98384a93e722db40
parentd5fd8fef67a0a0b4d30dd8b23052c380632ae0e2 (diff)
downloadrust-e4baa26d2a24845bb960a9a51fa3c4ecf63bdd4a.tar.gz
rust-e4baa26d2a24845bb960a9a51fa3c4ecf63bdd4a.zip
document purpose of test
-rw-r--r--src/test/run-pass/for-loop-lifetime-of-unbound-values.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/run-pass/for-loop-lifetime-of-unbound-values.rs b/src/test/run-pass/for-loop-lifetime-of-unbound-values.rs
index 4653a493898..7a088b51334 100644
--- a/src/test/run-pass/for-loop-lifetime-of-unbound-values.rs
+++ b/src/test/run-pass/for-loop-lifetime-of-unbound-values.rs
@@ -8,6 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// Test when destructors run in a for loop. The intention is
+// that the value for each iteration is dropped *after* the loop
+// body has executed. This is true even when the value is assigned
+// to a `_` pattern (and hence ignored).
+
 use std::cell::Cell;
 
 struct Flag<'a>(&'a Cell<bool>);