]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/lower_intrinsics.non_const.LowerIntrinsics.diff
Rollup merge of #104036 - compiler-errors:option-sugg, r=petrochenkov
[rust.git] / src / test / mir-opt / lower_intrinsics.non_const.LowerIntrinsics.diff
1 - // MIR for `non_const` before LowerIntrinsics
2 + // MIR for `non_const` after LowerIntrinsics
3   
4   fn non_const() -> usize {
5       let mut _0: usize;                   // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:26: +0:31
6       let _1: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::<T>}; // in scope 0 at $DIR/lower_intrinsics.rs:+2:9: +2:18
7       let mut _2: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::<T>}; // in scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:14
8       scope 1 {
9           debug size_of_t => _1;           // in scope 1 at $DIR/lower_intrinsics.rs:+2:9: +2:18
10       }
11   
12       bb0: {
13           StorageLive(_1);                 // scope 0 at $DIR/lower_intrinsics.rs:+2:9: +2:18
14           _1 = std::intrinsics::size_of::<T>; // scope 0 at $DIR/lower_intrinsics.rs:+2:21: +2:51
15                                            // mir::Constant
16                                            // + span: $DIR/lower_intrinsics.rs:37:21: 37:51
17                                            // + literal: Const { ty: extern "rust-intrinsic" fn() -> usize {std::intrinsics::size_of::<T>}, val: Value(<ZST>) }
18           StorageLive(_2);                 // scope 1 at $DIR/lower_intrinsics.rs:+3:5: +3:14
19           _2 = _1;                         // scope 1 at $DIR/lower_intrinsics.rs:+3:5: +3:14
20 -         _0 = move _2() -> bb1;           // scope 1 at $DIR/lower_intrinsics.rs:+3:5: +3:16
21 +         _0 = SizeOf(T);                  // scope 1 at $DIR/lower_intrinsics.rs:+3:5: +3:16
22 +         goto -> bb1;                     // scope 1 at $DIR/lower_intrinsics.rs:+3:5: +3:16
23       }
24   
25       bb1: {
26           StorageDead(_2);                 // scope 1 at $DIR/lower_intrinsics.rs:+3:15: +3:16
27           StorageDead(_1);                 // scope 0 at $DIR/lower_intrinsics.rs:+4:1: +4:2
28           return;                          // scope 0 at $DIR/lower_intrinsics.rs:+4:2: +4:2
29       }
30   }
31