blob: d81d23c1c4c1e53dba1b7b139b61fba8b4c7e82e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
- // MIR for `try_identity` before DestinationPropagation
+ // MIR for `try_identity` after DestinationPropagation
fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
debug x => _1; // in scope 0 at $DIR/simplify_try.rs:+0:17: +0:18
let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:+0:41: +0:57
let _2: u32; // in scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:+2:9: +2:15
let _6: i32; // in scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:+2:19: +2:51
let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:+2:37: +2:50
let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:+2:48: +2:49
let _10: u32; // in scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:+5:8: +5:9
scope 1 {
- debug y => _2; // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
+ debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
}
scope 2 {
debug e => _6; // in scope 2 at $DIR/simplify_try.rs:+2:13: +2:14
scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:22:37: 22:50
debug t => _9; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
}
scope 6 (inlined from_error::<u32, i32>) { // at $DIR/simplify_try.rs:22:26: 22:51
debug e => _8; // in scope 6 at $DIR/simplify_try.rs:+0:21: +0:22
}
}
scope 3 {
- debug v => _10; // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
+ debug v => ((_0 as Ok).0: u32); // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
}
scope 4 (inlined into_result::<u32, i32>) { // at $DIR/simplify_try.rs:21:19: 21:33
- debug r => _4; // in scope 4 at $DIR/simplify_try.rs:+0:22: +0:23
+ debug r => _3; // in scope 4 at $DIR/simplify_try.rs:+0:22: +0:23
}
bb0: {
- StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
- StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
- StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
- _4 = _1; // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
- _3 = move _4; // scope 4 at $DIR/simplify_try.rs:+0:5: +0:6
- StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:+1:32: +1:33
+ nop; // scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
+ nop; // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
+ nop; // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
+ _3 = _1; // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
+ nop; // scope 4 at $DIR/simplify_try.rs:+0:5: +0:6
+ nop; // scope 0 at $DIR/simplify_try.rs:+1:32: +1:33
_5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
switchInt(move _5) -> [0_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:+1:13: +1:33
}
bb1: {
- StorageLive(_10); // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
- _10 = ((_3 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
- _2 = _10; // scope 3 at $DIR/simplify_try.rs:+3:18: +3:19
- StorageDead(_10); // scope 0 at $DIR/simplify_try.rs:+3:18: +3:19
- StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
- StorageLive(_11); // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
- _11 = _2; // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
+ nop; // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
+ ((_0 as Ok).0: u32) = ((_3 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
+ nop; // scope 3 at $DIR/simplify_try.rs:+3:18: +3:19
+ nop; // scope 0 at $DIR/simplify_try.rs:+3:18: +3:19
+ nop; // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
+ nop; // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
+ nop; // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
Deinit(_0); // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
- ((_0 as Ok).0: u32) = move _11; // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
+ nop; // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
discriminant(_0) = 0; // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
- StorageDead(_11); // scope 1 at $DIR/simplify_try.rs:+5:9: +5:10
- StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
+ nop; // scope 1 at $DIR/simplify_try.rs:+5:9: +5:10
+ nop; // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
return; // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
}
bb2: {
StorageLive(_6); // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
nop; // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
StorageLive(_8); // scope 2 at $DIR/simplify_try.rs:+2:37: +2:50
StorageLive(_9); // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
nop; // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
nop; // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
StorageDead(_9); // scope 2 at $DIR/simplify_try.rs:+2:49: +2:50
nop; // scope 6 at $DIR/simplify_try.rs:+0:9: +0:10
Deinit(_0); // scope 6 at $DIR/simplify_try.rs:+0:5: +0:11
discriminant(_0) = 1; // scope 6 at $DIR/simplify_try.rs:+0:5: +0:11
StorageDead(_8); // scope 2 at $DIR/simplify_try.rs:+2:50: +2:51
StorageDead(_6); // scope 0 at $DIR/simplify_try.rs:+2:50: +2:51
- StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
- StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
+ nop; // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
+ nop; // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
return; // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
}
}
|