]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/lower_intrinsics.forget.LowerIntrinsics.diff
Rollup merge of #107779 - compiler-errors:issue-107775, r=jackh726
[rust.git] / tests / 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:+0:18: +0:19
6       let mut _0: ();                      // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:24: +0:24
7       let mut _2: T;                       // in scope 0 at $DIR/lower_intrinsics.rs:+1:30: +1:31
8   
9       bb0: {
10           StorageLive(_2);                 // scope 0 at $DIR/lower_intrinsics.rs:+1:30: +1:31
11           _2 = move _1;                    // scope 0 at $DIR/lower_intrinsics.rs:+1:30: +1:31
12 -         _0 = std::intrinsics::forget::<T>(move _2) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:32
13 -                                          // mir::Constant
14 -                                          // + span: $DIR/lower_intrinsics.rs:26:5: 26: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:+1:5: +1:32
17 +         goto -> bb1;                     // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:32
18       }
19   
20       bb1: {
21           StorageDead(_2);                 // scope 0 at $DIR/lower_intrinsics.rs:+1:31: +1:32
22           goto -> bb2;                     // scope 0 at $DIR/lower_intrinsics.rs:+2:1: +2:2
23       }
24   
25       bb2: {
26           return;                          // scope 0 at $DIR/lower_intrinsics.rs:+2:2: +2:2
27       }
28   }
29