summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.panic-unwind.diff
blob: 1f7a6f9ad59fca6227bd6acc00bf6d9a58a41ad2 (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
- // MIR for `opt_generic_copy` before RemoveUnneededDrops
+ // MIR for `opt_generic_copy` after RemoveUnneededDrops
  
  fn opt_generic_copy(_1: T) -> () {
      debug x => _1;
      let mut _0: ();
      let _2: ();
      let mut _3: T;
      scope 1 (inlined std::mem::drop::<T>) {
          debug _x => _3;
      }
  
      bb0: {
-         nop;
          StorageLive(_3);
          _3 = _1;
-         drop(_3) -> [return: bb1, unwind continue];
-     }
- 
-     bb1: {
          StorageDead(_3);
-         nop;
-         nop;
          return;
      }
  }