]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / mir-opt / simplify_try.try_identity.SimplifyBranchSame.after.mir
1 // MIR for `try_identity` after SimplifyBranchSame
2
3 fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
4 debug x => _1; // in scope 0 at $DIR/simplify_try.rs:7:17: 7:18
5 let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:7:41: 7:57
6 let _2: u32; // in scope 0 at $DIR/simplify_try.rs:8:9: 8:10
7 let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
8 let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:14
9 let mut _5: isize; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
10 let _6: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
11 let mut _7: !; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
12 let mut _8: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
13 let mut _9: i32; // in scope 0 at $DIR/simplify_try.rs:8:14: 8:15
14 let _10: u32; // in scope 0 at $DIR/simplify_try.rs:8:13: 8:15
15 let mut _11: u32; // in scope 0 at $DIR/simplify_try.rs:9:8: 9:9
16 scope 1 {
17 debug y => ((_0 as Ok).0: u32); // in scope 1 at $DIR/simplify_try.rs:8:9: 8:10
18 }
19 scope 2 {
20 debug err => ((_0 as Err).0: i32); // in scope 2 at $DIR/simplify_try.rs:8:14: 8:15
21 scope 3 {
22 scope 7 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:8:14: 8:15
23 debug t => ((_0 as Err).0: i32); // in scope 7 at $DIR/simplify_try.rs:8:14: 8:15
24 }
25 scope 8 (inlined <Result<u32, i32> as Try>::from_error) { // at $DIR/simplify_try.rs:8:13: 8:15
26 debug v => ((_0 as Err).0: i32); // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
27 let mut _12: i32; // in scope 8 at $DIR/simplify_try.rs:8:13: 8:15
28 }
29 }
30 }
31 scope 4 {
32 debug val => ((_0 as Ok).0: u32); // in scope 4 at $DIR/simplify_try.rs:8:13: 8:15
33 scope 5 {
34 }
35 }
36 scope 6 (inlined <Result<u32, i32> as Try>::into_result) { // at $DIR/simplify_try.rs:8:13: 8:15
37 debug self => _4; // in scope 6 at $DIR/simplify_try.rs:8:13: 8:15
38 }
39
40 bb0: {
41 StorageLive(_2); // scope 0 at $DIR/simplify_try.rs:8:9: 8:10
42 StorageLive(_3); // scope 0 at $DIR/simplify_try.rs:8:13: 8:15
43 StorageLive(_4); // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
44 _4 = _1; // scope 0 at $DIR/simplify_try.rs:8:13: 8:14
45 _3 = move _4; // scope 6 at $DIR/simplify_try.rs:8:13: 8:15
46 StorageDead(_4); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
47 _5 = discriminant(_3); // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
48 goto -> bb1; // scope 0 at $DIR/simplify_try.rs:8:14: 8:15
49 }
50
51 bb1: {
52 _0 = move _3; // scope 1 at $DIR/simplify_try.rs:9:5: 9:10
53 StorageDead(_3); // scope 0 at $DIR/simplify_try.rs:8:15: 8:16
54 StorageDead(_2); // scope 0 at $DIR/simplify_try.rs:10:1: 10:2
55 return; // scope 0 at $DIR/simplify_try.rs:10:2: 10:2
56 }
57 }