We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a49e82 commit 9832267Copy full SHA for 9832267
tests/ui/cleanup-rvalue-for-scope.rs renamed to tests/ui/lifetimes/rvalue-lifetime-for-loop.rs
@@ -1,17 +1,23 @@
1
+//! Test that the lifetime of rvalues in for loops is extended
2
+//! to the for loop itself.
3
+
4
//@ run-pass
5
6
#![allow(non_snake_case)]
7
#![allow(dead_code)]
8
#![allow(unused_variables)]
-// Test that the lifetime of rvalues in for loops is extended
-// to the for loop itself.
9
10
static mut FLAGS: u64 = 0;
11
-struct Box<T> { f: T }
-struct AddFlags { bits: u64 }
12
+struct Box<T> {
13
+ f: T,
14
+}
15
+struct AddFlags {
16
+ bits: u64,
17
18
19
fn AddFlags(bits: u64) -> AddFlags {
- AddFlags { bits: bits }
20
+ AddFlags { bits }
21
}
22
23
fn arg(exp: u64, _x: &AddFlags) {
0 commit comments