document purpose of test

This commit is contained in:
Niko Matsakis 2017-06-15 12:28:07 -04:00 committed by Brian Anderson
parent 7ded8a9066
commit b568ab6abb

View file

@ -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>);