fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
3.9 KiB70 linesraw
1- // MIR for `try_identity` before SimplifyArmIdentity
2+ // MIR for `try_identity` after SimplifyArmIdentity
3  
4  fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
5      debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:5:17: 5:18
6      let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:5:41: 5:57
7      let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:6:9: 6:10
8      let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:6:13: 6:15
9      let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:6:13: 6:14
10      let mut _5: isize;                   // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
11      let _6: i32;                         // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
12      let mut _7: !;                       // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
13      let mut _8: i32;                     // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
14      let mut _9: i32;                     // in scope 0 at $DIR/simplify_try.rs:6:14: 6:15
15      let _10: u32;                        // in scope 0 at $DIR/simplify_try.rs:6:13: 6:15
16      let mut _11: u32;                    // in scope 0 at $DIR/simplify_try.rs:7:8: 7:9
17      scope 1 {
18          debug y => _10;                  // in scope 1 at $DIR/simplify_try.rs:6:9: 6:10
19      }
20      scope 2 {
21          debug err => _6;                 // in scope 2 at $DIR/simplify_try.rs:6:14: 6:15
22          scope 3 {
23              scope 7 {
24                  debug t => _6;           // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
25              }
26              scope 8 {
27                  debug v => _6;           // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
28                  let mut _12: i32;        // in scope 8 at $DIR/simplify_try.rs:6:14: 6:15
29              }
30          }
31      }
32      scope 4 {
33          debug val => _10;                // in scope 4 at $DIR/simplify_try.rs:6:13: 6:15
34          scope 5 {
35          }
36      }
37      scope 6 {
38          debug self => _1;                // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
39      }
40  
41      bb0: {
42          _5 = discriminant(_1);           // bb0[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
43          switchInt(move _5) -> [0isize: bb1, otherwise: bb2]; // bb0[1]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
44      }
45  
46      bb1: {
47-         _10 = ((_1 as Ok).0: u32);       // bb1[0]: scope 0 at $DIR/simplify_try.rs:6:13: 6:15
48-         ((_0 as Ok).0: u32) = move _10;  // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
49-         discriminant(_0) = 0;            // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
50+         _0 = move _1;                    // bb1[0]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
51+         nop;                             // bb1[1]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
52+         nop;                             // bb1[2]: scope 1 at $DIR/simplify_try.rs:7:5: 7:10
53          goto -> bb3;                     // bb1[3]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2
54      }
55  
56      bb2: {
57-         _6 = ((_1 as Err).0: i32);       // bb2[0]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
58-         ((_0 as Err).0: i32) = move _6;  // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
59-         discriminant(_0) = 1;            // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
60+         _0 = move _1;                    // bb2[0]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
61+         nop;                             // bb2[1]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
62+         nop;                             // bb2[2]: scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
63          goto -> bb3;                     // bb2[3]: scope 0 at $DIR/simplify_try.rs:6:14: 6:15
64      }
65  
66      bb3: {
67          return;                          // bb3[0]: scope 0 at $DIR/simplify_try.rs:8:2: 8:2
68      }
69  }
70