11
11
// ignore-tidy-linelength
12
12
// compile-flags: -Z verbose -Z mir-emit-validate=1
13
13
14
- struct Test ;
14
+ struct Test ( i32 ) ;
15
15
16
16
impl Test {
17
17
// Make sure we run the pass on a method, not just on bare functions.
@@ -20,7 +20,7 @@ impl Test {
20
20
21
21
fn main ( ) {
22
22
let mut x = 0 ;
23
- Test . foo ( & mut x) ;
23
+ Test ( 0 ) . foo ( & mut x) ;
24
24
25
25
// Also test closures
26
26
let c = |x : & mut i32 | { let y = & * x; * y } ;
@@ -31,29 +31,29 @@ fn main() {
31
31
// the interesting lines of code also contain name of the source file, so we cannot test for it.
32
32
33
33
// END RUST SOURCE
34
- // START rustc.node10 .EraseRegions.after.mir
34
+ // START rustc.node12 .EraseRegions.after.mir
35
35
// bb0: {
36
36
// Validate(Acquire, [_1: &ReFree(DefId { krate: CrateNum(0), node: DefIndex(5) => validate_1/8cd878b::{{impl}}[0]::foo[0] }, BrAnon(0)) Test, _2: &ReFree(DefId { krate: CrateNum(0), node: DefIndex(5) => validate_1/8cd878b::{{impl}}[0]::foo[0] }, BrAnon(1)) mut i32]);
37
37
// return;
38
38
// }
39
- // END rustc.node10 .EraseRegions.after.mir
40
- // START rustc.node21 .EraseRegions.after.mir
39
+ // END rustc.node12 .EraseRegions.after.mir
40
+ // START rustc.node23 .EraseRegions.after.mir
41
41
// fn main() -> () {
42
42
// bb0: {
43
- // Validate(Suspend(ReScope(Misc(NodeId(30 )))), [_1: i32]);
43
+ // Validate(Suspend(ReScope(Misc(NodeId(34 )))), [_1: i32]);
44
44
// _6 = &ReErased mut _1;
45
- // Validate(Acquire, [(*_6): i32/ReScope(Misc(NodeId(30 )))]);
46
- // Validate(Suspend(ReScope(Misc(NodeId(30 )))), [(*_6): i32/ReScope(Misc(NodeId(30 )))]);
45
+ // Validate(Acquire, [(*_6): i32/ReScope(Misc(NodeId(34 )))]);
46
+ // Validate(Suspend(ReScope(Misc(NodeId(34 )))), [(*_6): i32/ReScope(Misc(NodeId(34 )))]);
47
47
// _5 = &ReErased mut (*_6);
48
- // Validate(Acquire, [(*_5): i32/ReScope(Misc(NodeId(30 )))]);
49
- // Validate(Release, [_3: &ReScope(Misc(NodeId(30 ))) Test, _5: &ReScope(Misc(NodeId(30 ))) mut i32]);
48
+ // Validate(Acquire, [(*_5): i32/ReScope(Misc(NodeId(34 )))]);
49
+ // Validate(Release, [_3: &ReScope(Misc(NodeId(34 ))) Test, _5: &ReScope(Misc(NodeId(34 ))) mut i32]);
50
50
// _2 = const Test::foo(_3, _5) -> bb1;
51
51
// }
52
52
//
53
53
// bb1: {
54
54
// Validate(Acquire, [_2: ()]);
55
- // EndRegion(ReScope(Misc(NodeId(30 ))));
55
+ // EndRegion(ReScope(Misc(NodeId(34 ))));
56
56
// return;
57
57
// }
58
58
// }
59
- // END rustc.node21 .EraseRegions.after.mir
59
+ // END rustc.node23 .EraseRegions.after.mir
0 commit comments