]> git.proxmox.com Git - rustc.git/blob - src/test/mir-opt/const_prop/const_prop_fails_gracefully/rustc.main.ConstProp.diff
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / mir-opt / const_prop / const_prop_fails_gracefully / rustc.main.ConstProp.diff
1 - // MIR for `main` before ConstProp
2 + // MIR for `main` after ConstProp
3
4 fn main() -> () {
5 let mut _0: (); // return place in scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 5:11
6 let _1: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
7 let mut _2: *const i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30
8 let _3: &i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
9 let _4: (); // in scope 0 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
10 let mut _5: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
11 scope 1 {
12 debug x => _1; // in scope 1 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
13 }
14
15 bb0: {
16 StorageLive(_1); // bb0[0]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
17 StorageLive(_2); // bb0[1]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30
18 StorageLive(_3); // bb0[2]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
19 _3 = const main::FOO; // bb0[3]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
20 // ty::Const
21 // + ty: &i32
22 // + val: Unevaluated(DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), [], None)
23 // mir::Constant
24 // + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
25 // + literal: Const { ty: &i32, val: Unevaluated(DefId(0:5 ~ const_prop_fails_gracefully[317d]::main[0]::FOO[0]), [], None) }
26 _2 = &raw const (*_3); // bb0[4]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
27 _1 = move _2 as usize (Misc); // bb0[5]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
28 StorageDead(_2); // bb0[6]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39
29 StorageDead(_3); // bb0[7]: scope 0 at $DIR/const_prop_fails_gracefully.rs:7:39: 7:40
30 StorageLive(_4); // bb0[8]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
31 StorageLive(_5); // bb0[9]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
32 _5 = _1; // bb0[10]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
33 _4 = const read(move _5) -> bb1; // bb0[11]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
34 // ty::Const
35 // + ty: fn(usize) {read}
36 // + val: Value(Scalar(<ZST>))
37 // mir::Constant
38 // + span: $DIR/const_prop_fails_gracefully.rs:8:5: 8:9
39 // + literal: Const { ty: fn(usize) {read}, val: Value(Scalar(<ZST>)) }
40 }
41
42 bb1: {
43 StorageDead(_5); // bb1[0]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12
44 StorageDead(_4); // bb1[1]: scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13
45 _0 = const (); // bb1[2]: scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
46 // ty::Const
47 // + ty: ()
48 // + val: Value(Scalar(<ZST>))
49 // mir::Constant
50 // + span: $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
51 // + literal: Const { ty: (), val: Value(Scalar(<ZST>)) }
52 StorageDead(_1); // bb1[3]: scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2
53 return; // bb1[4]: scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2
54 }
55 }
56