]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/lower_intrinsics.forget.LowerIntrinsics.diff
6c99e1b7ca6cb1ed48b718414d052f43020a2e74
[rust.git] / src / test / mir-opt / lower_intrinsics.forget.LowerIntrinsics.diff
1 - // MIR for `forget` before LowerIntrinsics
2 + // MIR for `forget` after LowerIntrinsics
3   
4   fn forget(_1: T) -> () {
5       debug t => _1;                       // in scope 0 at $DIR/lower_intrinsics.rs:23:18: 23:19
6       let mut _0: ();                      // return place in scope 0 at $DIR/lower_intrinsics.rs:23:24: 23:24
7       let mut _2: T;                       // in scope 0 at $DIR/lower_intrinsics.rs:24:30: 24:31
8   
9       bb0: {
10           StorageLive(_2);                 // scope 0 at $DIR/lower_intrinsics.rs:24:30: 24:31
11           _2 = move _1;                    // scope 0 at $DIR/lower_intrinsics.rs:24:30: 24:31
12 -         _0 = std::intrinsics::forget::<T>(move _2) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:24:5: 24:32
13 -                                          // mir::Constant
14 -                                          // + span: $DIR/lower_intrinsics.rs:24:5: 24:29
15 -                                          // + literal: Const { ty: extern "rust-intrinsic" fn(T) {std::intrinsics::forget::<T>}, val: Value(<ZST>) }
16 +         _0 = const ();                   // scope 0 at $DIR/lower_intrinsics.rs:24:5: 24:32
17 +         goto -> bb1;                     // scope 0 at $DIR/lower_intrinsics.rs:24:5: 24:32
18       }
19   
20       bb1: {
21           StorageDead(_2);                 // scope 0 at $DIR/lower_intrinsics.rs:24:31: 24:32
22           goto -> bb2;                     // scope 0 at $DIR/lower_intrinsics.rs:25:1: 25:2
23       }
24   
25       bb2: {
26           return;                          // scope 0 at $DIR/lower_intrinsics.rs:25:2: 25:2
27       }
28   
29       bb3 (cleanup): {
30           resume;                          // scope 0 at $DIR/lower_intrinsics.rs:23:1: 25:2
31       }
32   }
33