Skip to content

Commit 9832267

Browse files
committed
moved renamed | cleanup-rvalue-for-scope.rs
1 parent 6a49e82 commit 9832267

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests/ui/cleanup-rvalue-for-scope.rs renamed to tests/ui/lifetimes/rvalue-lifetime-for-loop.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
//! Test that the lifetime of rvalues in for loops is extended
2+
//! to the for loop itself.
3+
14
//@ run-pass
25

36
#![allow(non_snake_case)]
47
#![allow(dead_code)]
58
#![allow(unused_variables)]
6-
// Test that the lifetime of rvalues in for loops is extended
7-
// to the for loop itself.
9+
810
static mut FLAGS: u64 = 0;
911

10-
struct Box<T> { f: T }
11-
struct AddFlags { bits: u64 }
12+
struct Box<T> {
13+
f: T,
14+
}
15+
struct AddFlags {
16+
bits: u64,
17+
}
1218

1319
fn AddFlags(bits: u64) -> AddFlags {
14-
AddFlags { bits: bits }
20+
AddFlags { bits }
1521
}
1622

1723
fn arg(exp: u64, _x: &AddFlags) {

0 commit comments

Comments
 (0)