fork/rust

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

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

master
1.2 KiB43 linesraw
1- // MIR for `main` before DataflowConstProp
2+ // MIR for `main` after DataflowConstProp
3  
4  fn main() -> () {
5      let mut _0: ();
6      let _1: u32;
7      let mut _2: u32;
8      let mut _3: [u32; 8];
9      let _4: usize;
10      let mut _5: usize;
11      let mut _6: bool;
12      scope 1 {
13          debug x => _1;
14      }
15  
16      bb0: {
17          StorageLive(_1);
18          StorageLive(_2);
19          StorageLive(_3);
20          _3 = [const 42_u32; 8];
21          StorageLive(_4);
22          _4 = const 2_usize;
23-         _5 = Len(_3);
24-         _6 = Lt(_4, _5);
25-         assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> [success: bb1, unwind unreachable];
26+         _5 = const 8_usize;
27+         _6 = const true;
28+         assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> [success: bb1, unwind unreachable];
29      }
30  
31      bb1: {
32-         _2 = _3[_4];
33+         _2 = _3[2 of 3];
34          _1 = Add(move _2, const 0_u32);
35          StorageDead(_2);
36          StorageDead(_4);
37          StorageDead(_3);
38          _0 = const ();
39          StorageDead(_1);
40          return;
41      }
42  }
43