summary refs log tree commit diff
path: root/src/test/mir-opt/issue-72181/rustc.foo.mir_map.0.mir
blob: 2941e282cf42b4fdd4cba34869540d21ed006637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// MIR for `foo` 0 mir_map

fn foo(_1: [(Never, u32); 1]) -> u32 {
    debug xs => _1;                      // in scope 0 at $DIR/issue-72181.rs:15:8: 15:10
    let mut _0: u32;                     // return place in scope 0 at $DIR/issue-72181.rs:15:34: 15:37
    let _2: usize;                       // in scope 0 at $DIR/issue-72181.rs:15:43: 15:44
    let mut _3: usize;                   // in scope 0 at $DIR/issue-72181.rs:15:40: 15:45
    let mut _4: bool;                    // in scope 0 at $DIR/issue-72181.rs:15:40: 15:45

    bb0: {
        StorageLive(_2);                 // scope 0 at $DIR/issue-72181.rs:15:43: 15:44
        _2 = const 0usize;               // scope 0 at $DIR/issue-72181.rs:15:43: 15:44
                                         // ty::Const
                                         // + ty: usize
                                         // + val: Value(Scalar(0x0000000000000000))
                                         // mir::Constant
                                         // + span: $DIR/issue-72181.rs:15:43: 15:44
                                         // + literal: Const { ty: usize, val: Value(Scalar(0x0000000000000000)) }
        _3 = Len(_1);                    // scope 0 at $DIR/issue-72181.rs:15:40: 15:45
        _4 = Lt(_2, _3);                 // scope 0 at $DIR/issue-72181.rs:15:40: 15:45
        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
    }

    bb1 (cleanup): {
        resume;                          // scope 0 at $DIR/issue-72181.rs:15:1: 15:49
    }

    bb2: {
        _0 = (_1[_2].1: u32);            // scope 0 at $DIR/issue-72181.rs:15:40: 15:47
        StorageDead(_2);                 // scope 0 at $DIR/issue-72181.rs:15:48: 15:49
        goto -> bb3;                     // scope 0 at $DIR/issue-72181.rs:15:49: 15:49
    }

    bb3: {
        return;                          // scope 0 at $DIR/issue-72181.rs:15:49: 15:49
    }
}