fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.5 KiB54 linesraw
1- // MIR for `main` before ConstProp
2+ // MIR for `main` after ConstProp
3  
4  fn main() -> () {
5      let mut _0: ();
6      let _1: i32;
7      let mut _2: i32;
8      let mut _3: std::boxed::Box<i32>;
9      let mut _4: usize;
10      let mut _5: usize;
11      let mut _6: *mut u8;
12      let mut _7: std::boxed::Box<i32>;
13      let mut _8: *const i32;
14      let mut _9: *const i32;
15      scope 1 {
16          debug x => _1;
17      }
18      scope 2 {
19      }
20  
21      bb0: {
22          StorageLive(_1);
23          StorageLive(_2);
24          StorageLive(_3);
25-         _4 = SizeOf(i32);
26-         _5 = AlignOf(i32);
27-         _6 = alloc::alloc::exchange_malloc(move _4, move _5) -> [return: bb1, unwind unreachable];
28+         _4 = const 4_usize;
29+         _5 = const 4_usize;
30+         _6 = alloc::alloc::exchange_malloc(const 4_usize, const 4_usize) -> [return: bb1, unwind unreachable];
31      }
32  
33      bb1: {
34          StorageLive(_7);
35          _7 = ShallowInitBox(move _6, i32);
36          _8 = (((_7.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>).0: *const i32);
37          (*_8) = const 42_i32;
38          _3 = move _7;
39          StorageDead(_7);
40          _9 = (((_3.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>).0: *const i32);
41          _2 = (*_9);
42          _1 = Add(move _2, const 0_i32);
43          StorageDead(_2);
44          drop(_3) -> [return: bb2, unwind unreachable];
45      }
46  
47      bb2: {
48          StorageDead(_3);
49          _0 = const ();
50          StorageDead(_1);
51          return;
52      }
53  }
54