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.0 KiB52 linesraw
1// MIR for `main` after SimplifyCfg-elaborate-drops
2
3fn main() -> () {
4    let mut _0: ();                      // return place in scope 0 at $DIR/byte_slice.rs:4:11: 4:11
5    let _1: &[u8; 3];                    // in scope 0 at $DIR/byte_slice.rs:5:9: 5:10
6    scope 1 {
7        debug x => _1;                   // in scope 1 at $DIR/byte_slice.rs:5:9: 5:10
8        let _2: [u8; 2];                 // in scope 1 at $DIR/byte_slice.rs:6:9: 6:10
9        scope 2 {
10            debug y => _2;               // in scope 2 at $DIR/byte_slice.rs:6:9: 6:10
11        }
12    }
13
14    bb0: {
15        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/byte_slice.rs:5:9: 5:10
16        _1 = const b"foo";               // bb0[1]: scope 0 at $DIR/byte_slice.rs:5:13: 5:19
17                                         // ty::Const
18                                         // + ty: &[u8; 3]
19                                         // + val: Value(Scalar(alloc0+0))
20                                         // mir::Constant
21                                         // + span: $DIR/byte_slice.rs:5:13: 5:19
22                                         // + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc0+0)) }
23        StorageLive(_2);                 // bb0[2]: scope 1 at $DIR/byte_slice.rs:6:9: 6:10
24        _2 = [const 5u8, const 120u8];   // bb0[3]: scope 1 at $DIR/byte_slice.rs:6:13: 6:24
25                                         // ty::Const
26                                         // + ty: u8
27                                         // + val: Value(Scalar(0x05))
28                                         // mir::Constant
29                                         // + span: $DIR/byte_slice.rs:6:14: 6:17
30                                         // + literal: Const { ty: u8, val: Value(Scalar(0x05)) }
31                                         // ty::Const
32                                         // + ty: u8
33                                         // + val: Value(Scalar(0x78))
34                                         // mir::Constant
35                                         // + span: $DIR/byte_slice.rs:6:19: 6:23
36                                         // + literal: Const { ty: u8, val: Value(Scalar(0x78)) }
37        _0 = const ();                   // bb0[4]: scope 0 at $DIR/byte_slice.rs:4:11: 7:2
38                                         // ty::Const
39                                         // + ty: ()
40                                         // + val: Value(Scalar(<ZST>))
41                                         // mir::Constant
42                                         // + span: $DIR/byte_slice.rs:4:11: 7:2
43                                         // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
44        StorageDead(_2);                 // bb0[5]: scope 1 at $DIR/byte_slice.rs:7:1: 7:2
45        StorageDead(_1);                 // bb0[6]: scope 0 at $DIR/byte_slice.rs:7:1: 7:2
46        return;                          // bb0[7]: scope 0 at $DIR/byte_slice.rs:7:2: 7:2
47    }
48}
49
50alloc0 (size: 3, align: 1) {
51    66 6f 6f                                        │ foo
52}