]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / mir-opt / issue-72181 / rustc.foo.mir_map.0.mir
1 // MIR for `foo` 0 mir_map
2
3 fn foo(_1: [(Never, u32); 1]) -> u32 {
4 debug xs => _1; // in scope 0 at $DIR/issue-72181.rs:15:8: 15:10
5 let mut _0: u32; // return place in scope 0 at $DIR/issue-72181.rs:15:34: 15:37
6 let _2: usize; // in scope 0 at $DIR/issue-72181.rs:15:43: 15:44
7 let mut _3: usize; // in scope 0 at $DIR/issue-72181.rs:15:40: 15:45
8 let mut _4: bool; // in scope 0 at $DIR/issue-72181.rs:15:40: 15:45
9
10 bb0: {
11 StorageLive(_2); // scope 0 at $DIR/issue-72181.rs:15:43: 15:44
12 _2 = const 0usize; // scope 0 at $DIR/issue-72181.rs:15:43: 15:44
13 // ty::Const
14 // + ty: usize
15 // + val: Value(Scalar(0x0000000000000000))
16 // mir::Constant
17 // + span: $DIR/issue-72181.rs:15:43: 15:44
18 // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
19 _3 = Len(_1); // scope 0 at $DIR/issue-72181.rs:15:40: 15:45
20 _4 = Lt(_2, _3); // scope 0 at $DIR/issue-72181.rs:15:40: 15:45
21 assert(move _4, "index out of bounds: the len is {} but the index is {}", move _3, _2) -> [success: bb2, unwind: bb1]; // scope 0 at $DIR/issue-72181.rs:15:40: 15:45
22 }
23
24 bb1 (cleanup): {
25 resume; // scope 0 at $DIR/issue-72181.rs:15:1: 15:49
26 }
27
28 bb2: {
29 _0 = (_1[_2].1: u32); // scope 0 at $DIR/issue-72181.rs:15:40: 15:47
30 StorageDead(_2); // scope 0 at $DIR/issue-72181.rs:15:48: 15:49
31 goto -> bb3; // scope 0 at $DIR/issue-72181.rs:15:49: 15:49
32 }
33
34 bb3: {
35 return; // scope 0 at $DIR/issue-72181.rs:15:49: 15:49
36 }
37 }