fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
3.2 KiB47 linesraw
1// MIR for `bar` after Inline
2
3fn bar() -> bool {
4    let mut _0: bool;                    // return place in scope 0 at $DIR/inline-any-operand.rs:10:13: 10:17
5    let _1: fn(i32, i32) -> bool {foo};  // in scope 0 at $DIR/inline-any-operand.rs:11:9: 11:10
6    let mut _2: fn(i32, i32) -> bool {foo}; // in scope 0 at $DIR/inline-any-operand.rs:12:5: 12:6
7    let mut _3: i32;                     // in scope 0 at $DIR/inline-any-operand.rs:12:5: 12:13
8    let mut _4: i32;                     // in scope 0 at $DIR/inline-any-operand.rs:12:5: 12:13
9    scope 1 {
10        debug f => _1;                   // in scope 1 at $DIR/inline-any-operand.rs:11:9: 11:10
11        scope 2 {
12            debug x => _3;               // in scope 2 at $DIR/inline-any-operand.rs:16:8: 16:9
13            debug y => _4;               // in scope 2 at $DIR/inline-any-operand.rs:16:16: 16:17
14        }
15    }
16
17    bb0: {
18        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/inline-any-operand.rs:11:9: 11:10
19        _1 = const foo;                  // bb0[1]: scope 0 at $DIR/inline-any-operand.rs:11:13: 11:16
20                                         // ty::Const
21                                         // + ty: fn(i32, i32) -> bool {foo}
22                                         // + val: Value(Scalar(<ZST>))
23                                         // mir::Constant
24                                         // + span: $DIR/inline-any-operand.rs:11:13: 11:16
25                                         // + literal: Const { ty: fn(i32, i32) -> bool {foo}, val: Value(Scalar(<ZST>)) }
26        StorageLive(_2);                 // bb0[2]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6
27        _2 = _1;                         // bb0[3]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:6
28        _3 = const 1i32;                 // bb0[4]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
29                                         // ty::Const
30                                         // + ty: i32
31                                         // + val: Value(Scalar(0x00000001))
32                                         // mir::Constant
33                                         // + span: $DIR/inline-any-operand.rs:12:7: 12:8
34                                         // + literal: Const { ty: i32, val: Value(Scalar(0x00000001)) }
35        _4 = const -1i32;                // bb0[5]: scope 1 at $DIR/inline-any-operand.rs:12:5: 12:13
36                                         // ty::Const
37                                         // + ty: i32
38                                         // + val: Value(Scalar(0xffffffff))
39                                         // mir::Constant
40                                         // + span: $DIR/inline-any-operand.rs:12:10: 12:12
41                                         // + literal: Const { ty: i32, val: Value(Scalar(0xffffffff)) }
42        _0 = Eq(move _3, move _4);       // bb0[6]: scope 2 at $DIR/inline-any-operand.rs:17:5: 17:11
43        StorageDead(_2);                 // bb0[7]: scope 1 at $DIR/inline-any-operand.rs:12:12: 12:13
44        StorageDead(_1);                 // bb0[8]: scope 0 at $DIR/inline-any-operand.rs:13:1: 13:2
45        return;                          // bb0[9]: scope 0 at $DIR/inline-any-operand.rs:13:2: 13:2
46    }
47}