diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-06-15 12:28:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-15 12:28:07 -0400 |
| commit | e4baa26d2a24845bb960a9a51fa3c4ecf63bdd4a (patch) | |
| tree | afecccd2293b12c3f082e51d98384a93e722db40 | |
| parent | d5fd8fef67a0a0b4d30dd8b23052c380632ae0e2 (diff) | |
| download | rust-e4baa26d2a24845bb960a9a51fa3c4ecf63bdd4a.tar.gz rust-e4baa26d2a24845bb960a9a51fa3c4ecf63bdd4a.zip | |
document purpose of test
| -rw-r--r-- | src/test/run-pass/for-loop-lifetime-of-unbound-values.rs | 5 |
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>); |
