]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/inline/inline_diverging.g.Inline.diff
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / mir-opt / inline / inline_diverging.g.Inline.diff
1 - // MIR for `g` before Inline
2 + // MIR for `g` after Inline
3   
4   fn g(_1: i32) -> u32 {
5       debug i => _1;                       // in scope 0 at $DIR/inline_diverging.rs:+0:10: +0:11
6       let mut _0: u32;                     // return place in scope 0 at $DIR/inline_diverging.rs:+0:21: +0:24
7       let mut _2: bool;                    // in scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
8       let mut _3: i32;                     // in scope 0 at $DIR/inline_diverging.rs:+1:8: +1:9
9       let mut _4: i32;                     // in scope 0 at $DIR/inline_diverging.rs:+2:9: +2:10
10       let mut _5: !;                       // in scope 0 at $DIR/inline_diverging.rs:+3:12: +5:6
11       let _6: !;                           // in scope 0 at $DIR/inline_diverging.rs:+4:9: +4:16
12 +     scope 1 (inlined panic) {            // at $DIR/inline_diverging.rs:16:9: 16:16
13 +         let mut _7: !;                   // in scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
14 +     }
15   
16       bb0: {
17           StorageLive(_2);                 // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
18           StorageLive(_3);                 // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:9
19           _3 = _1;                         // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:9
20           _2 = Gt(move _3, const 0_i32);   // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
21           StorageDead(_3);                 // scope 0 at $DIR/inline_diverging.rs:+1:12: +1:13
22           switchInt(move _2) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
23       }
24   
25       bb1: {
26           StorageLive(_4);                 // scope 0 at $DIR/inline_diverging.rs:+2:9: +2:10
27           _4 = _1;                         // scope 0 at $DIR/inline_diverging.rs:+2:9: +2:10
28           _0 = move _4 as u32 (IntToInt);  // scope 0 at $DIR/inline_diverging.rs:+2:9: +2:17
29           StorageDead(_4);                 // scope 0 at $DIR/inline_diverging.rs:+2:16: +2:17
30           StorageDead(_2);                 // scope 0 at $DIR/inline_diverging.rs:+5:5: +5:6
31           return;                          // scope 0 at $DIR/inline_diverging.rs:+6:2: +6:2
32       }
33   
34       bb2: {
35           StorageLive(_6);                 // scope 0 at $DIR/inline_diverging.rs:+4:9: +4:16
36 -         _6 = panic();                    // scope 0 at $DIR/inline_diverging.rs:+4:9: +4:16
37 +         StorageLive(_7);                 // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
38 +         _7 = begin_panic::<&str>(const "explicit panic"); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
39                                            // mir::Constant
40 -                                          // + span: $DIR/inline_diverging.rs:16:9: 16:14
41 -                                          // + literal: Const { ty: fn() -> ! {panic}, val: Value(<ZST>) }
42 +                                          // + span: $SRC_DIR/std/src/panic.rs:LL:COL
43 +                                          // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
44 +                                          // mir::Constant
45 +                                          // + span: $SRC_DIR/std/src/panic.rs:LL:COL
46 +                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
47       }
48   }
49