Skip to content

Commit

Permalink
document purpose of test
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jun 15, 2017
1 parent d5fd8fe commit e4baa26
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/run-pass/for-loop-lifetime-of-unbound-values.rs
Expand Up @@ -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>);
Expand Down

0 comments on commit e4baa26

Please sign in to comment.