Skip to content

Commit 8d65dd6

Browse files
committed
Fix test formatting
1 parent 2d379b3 commit 8d65dd6

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
use std::cell::Cell;
212

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

515
impl<'a> Drop for Flag<'a> {
6-
fn drop(&mut self) {
7-
self.0.set(false)
8-
}
16+
fn drop(&mut self) {
17+
self.0.set(false)
18+
}
919
}
1020

1121
fn main() {
@@ -16,7 +26,7 @@ fn main() {
1626
}
1727
// The Flag value should be dead outside of the loop
1828
assert_eq!(alive2.get(), false);
19-
29+
2030
let alive = Cell::new(true);
2131
for _ in std::iter::once(Flag(&alive)) {
2232
// The Flag value should be alive in the for loop body even if it wasn't

0 commit comments

Comments
 (0)