1 - // MIR for `main` before ConstProp
2 + // MIR for `main` after ConstProp
5 let mut _0: (); // return place in scope 0 at $DIR/repeat.rs:5:11: 5:11
6 let _1: u32 as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/repeat.rs:6:9: 6:10
7 let mut _2: u32; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
8 let mut _3: [u32; 8]; // in scope 0 at $DIR/repeat.rs:6:18: 6:25
9 let _4: usize; // in scope 0 at $DIR/repeat.rs:6:26: 6:27
10 let mut _5: usize; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
11 let mut _6: bool; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
13 debug x => _1; // in scope 1 at $DIR/repeat.rs:6:9: 6:10
17 StorageLive(_1); // bb0[0]: scope 0 at $DIR/repeat.rs:6:9: 6:10
18 StorageLive(_2); // bb0[1]: scope 0 at $DIR/repeat.rs:6:18: 6:28
19 StorageLive(_3); // bb0[2]: scope 0 at $DIR/repeat.rs:6:18: 6:25
20 _3 = [const 42u32; 8]; // bb0[3]: scope 0 at $DIR/repeat.rs:6:18: 6:25
23 // + val: Value(Scalar(0x0000002a))
25 // + span: $DIR/repeat.rs:6:19: 6:21
26 // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
27 StorageLive(_4); // bb0[4]: scope 0 at $DIR/repeat.rs:6:26: 6:27
28 _4 = const 2usize; // bb0[5]: scope 0 at $DIR/repeat.rs:6:26: 6:27
31 // + val: Value(Scalar(0x00000002))
33 // + span: $DIR/repeat.rs:6:26: 6:27
34 // + literal: Const { ty: usize, val: Value(Scalar(0x00000002)) }
35 _5 = const 8usize; // bb0[6]: scope 0 at $DIR/repeat.rs:6:18: 6:28
38 // + val: Value(Scalar(0x00000008))
40 // + span: $DIR/repeat.rs:6:18: 6:28
41 // + literal: Const { ty: usize, val: Value(Scalar(0x00000008)) }
42 - _6 = Lt(_4, _5); // bb0[7]: scope 0 at $DIR/repeat.rs:6:18: 6:28
43 - assert(move _6, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // bb0[8]: scope 0 at $DIR/repeat.rs:6:18: 6:28
44 + _6 = const true; // bb0[7]: scope 0 at $DIR/repeat.rs:6:18: 6:28
47 + // + val: Value(Scalar(0x01))
49 + // + span: $DIR/repeat.rs:6:18: 6:28
50 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
51 + assert(const true, "index out of bounds: the len is {} but the index is {}", move _5, _4) -> bb1; // bb0[8]: scope 0 at $DIR/repeat.rs:6:18: 6:28
54 + // + val: Value(Scalar(0x01))
56 + // + span: $DIR/repeat.rs:6:18: 6:28
57 + // + literal: Const { ty: bool, val: Value(Scalar(0x01)) }
61 - _2 = _3[_4]; // bb1[0]: scope 0 at $DIR/repeat.rs:6:18: 6:28
62 - _1 = Add(move _2, const 0u32); // bb1[1]: scope 0 at $DIR/repeat.rs:6:18: 6:32
63 + _2 = const 42u32; // bb1[0]: scope 0 at $DIR/repeat.rs:6:18: 6:28
66 - // + val: Value(Scalar(0x00000000))
67 + // + val: Value(Scalar(0x0000002a))
69 - // + span: $DIR/repeat.rs:6:31: 6:32
70 - // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
71 + // + span: $DIR/repeat.rs:6:18: 6:28
72 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
73 + _1 = const 42u32; // bb1[1]: scope 0 at $DIR/repeat.rs:6:18: 6:32
76 + // + val: Value(Scalar(0x0000002a))
78 + // + span: $DIR/repeat.rs:6:18: 6:32
79 + // + literal: Const { ty: u32, val: Value(Scalar(0x0000002a)) }
80 StorageDead(_2); // bb1[2]: scope 0 at $DIR/repeat.rs:6:31: 6:32
81 StorageDead(_4); // bb1[3]: scope 0 at $DIR/repeat.rs:6:32: 6:33
82 StorageDead(_3); // bb1[4]: scope 0 at $DIR/repeat.rs:6:32: 6:33
83 _0 = const (); // bb1[5]: scope 0 at $DIR/repeat.rs:5:11: 7:2
86 // + val: Value(Scalar(<ZST>))
88 // + span: $DIR/repeat.rs:5:11: 7:2
89 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
90 StorageDead(_1); // bb1[6]: scope 0 at $DIR/repeat.rs:7:1: 7:2
91 return; // bb1[7]: scope 0 at $DIR/repeat.rs:7:2: 7:2