summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
blob: 782d0c6c5f267e6be877be922e0d6eeb2a890e1b (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;                       // in scope 0 at $DIR/remove_unneeded_drops.rs:+0:30: +0:31
      let mut _0: ();                      // return place in scope 0 at $DIR/remove_unneeded_drops.rs:+0:36: +0:36
      let _2: ();                          // in scope 0 at $DIR/remove_unneeded_drops.rs:+1:5: +1:12
      let mut _3: T;                       // in scope 0 at $DIR/remove_unneeded_drops.rs:+1:10: +1:11
      scope 1 (inlined std::mem::drop::<T>) { // at $DIR/remove_unneeded_drops.rs:14:5: 14:12
          debug _x => _3;                  // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
      }
  
      bb0: {
-         nop;                             // scope 0 at $DIR/remove_unneeded_drops.rs:+1:5: +1:12
          StorageLive(_3);                 // scope 0 at $DIR/remove_unneeded_drops.rs:+1:10: +1:11
          _3 = _1;                         // scope 0 at $DIR/remove_unneeded_drops.rs:+1:10: +1:11
-         drop(_3) -> bb1;                 // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
-     }
- 
-     bb1: {
          StorageDead(_3);                 // scope 0 at $DIR/remove_unneeded_drops.rs:+1:11: +1:12
-         nop;                             // scope 0 at $DIR/remove_unneeded_drops.rs:+1:12: +1:13
-         nop;                             // scope 0 at $DIR/remove_unneeded_drops.rs:+0:36: +2:2
          return;                          // scope 0 at $DIR/remove_unneeded_drops.rs:+2:2: +2:2
      }
  }