Skip to content

Commit e4baa26

Browse files
authored
document purpose of test
1 parent d5fd8fe commit e4baa26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/test/run-pass/for-loop-lifetime-of-unbound-values.rs

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// Test when destructors run in a for loop. The intention is
12+
// that the value for each iteration is dropped *after* the loop
13+
// body has executed. This is true even when the value is assigned
14+
// to a `_` pattern (and hence ignored).
15+
1116
use std::cell::Cell;
1217

1318
struct Flag<'a>(&'a Cell<bool>);

0 commit comments

Comments
 (0)