]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/issue_72181.foo.built.after.mir
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / mir-opt / issue_72181.foo.built.after.mir
1 // MIR for `foo` after built
2
3 fn foo(_1: [(Never, u32); 1]) -> u32 {
4     debug xs => _1;                      // in scope 0 at $DIR/issue_72181.rs:+0:8: +0:10
5     let mut _0: u32;                     // return place in scope 0 at $DIR/issue_72181.rs:+0:34: +0:37
6     let _2: usize;                       // in scope 0 at $DIR/issue_72181.rs:+0:43: +0:44
7     let mut _3: usize;                   // in scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
8     let mut _4: bool;                    // in scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
9
10     bb0: {
11         StorageLive(_2);                 // scope 0 at $DIR/issue_72181.rs:+0:43: +0:44
12         _2 = const 0_usize;              // scope 0 at $DIR/issue_72181.rs:+0:43: +0:44
13         _3 = Len(_1);                    // scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
14         _4 = Lt(_2, _3);                 // scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
15         assert(move _4, "index out of bounds: the length is {} but the index is {}", move _3, _2) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
16     }
17
18     bb1: {
19         _0 = (_1[_2].1: u32);            // scope 0 at $DIR/issue_72181.rs:+0:40: +0:47
20         StorageDead(_2);                 // scope 0 at $DIR/issue_72181.rs:+0:48: +0:49
21         return;                          // scope 0 at $DIR/issue_72181.rs:+0:49: +0:49
22     }
23
24     bb2 (cleanup): {
25         resume;                          // scope 0 at $DIR/issue_72181.rs:+0:1: +0:49
26     }
27 }