summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.panic-unwind.diff
blob: e0a610f60a795aa72c0c7eb20463b651e903453c (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
- // MIR for `hello` before ConstProp
+ // MIR for `hello` after ConstProp
  
  fn hello() -> () {
      let mut _0: ();
      let mut _1: bool;
      let mut _2: !;
  
      bb0: {
          StorageLive(_1);
-         _1 = const _;
-         switchInt(move _1) -> [0: bb2, otherwise: bb1];
+         _1 = const false;
+         switchInt(const false) -> [0: bb2, otherwise: bb1];
      }
  
      bb1: {
          _2 = begin_panic::<&str>(const "explicit panic") -> unwind continue;
      }
  
      bb2: {
          StorageDead(_1);
          return;
      }
  }