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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
- // MIR for `main` before ConstDebugInfo
+ // MIR for `main` after ConstDebugInfo
fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/const_debuginfo.rs:+0:11: +0:11
let _1: u8; // in scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
let mut _5: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:20
let mut _6: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:16
let mut _7: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:19: +4:20
let mut _8: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:23: +4:24
let mut _14: u32; // in scope 0 at $DIR/const_debuginfo.rs:+13:13: +13:16
let mut _15: u32; // in scope 0 at $DIR/const_debuginfo.rs:+13:19: +13:22
scope 1 {
- debug x => _1; // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
+ debug x => const 1_u8; // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
let _2: u8; // in scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
scope 2 {
- debug y => _2; // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
+ debug y => const 2_u8; // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
let _3: u8; // in scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
scope 3 {
- debug z => _3; // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
+ debug z => const 3_u8; // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
let _4: u8; // in scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
scope 4 {
- debug sum => _4; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
+ debug sum => const 6_u8; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
let _9: &str; // in scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
scope 5 {
- debug s => _9; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
+ debug s => const "hello, world!"; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
let _10: (bool, bool, u32); // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _16: bool; // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _17: bool; // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _18: u32; // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
scope 6 {
debug f => (bool, bool, u32){ .0 => _16, .1 => _17, .2 => _18, }; // in scope 6 at $DIR/const_debuginfo.rs:+8:9: +8:10
let _11: std::option::Option<u16>; // in scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
scope 7 {
debug o => _11; // in scope 7 at $DIR/const_debuginfo.rs:+10:9: +10:10
let _12: Point; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
let _19: u32; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
let _20: u32; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
scope 8 {
debug p => Point{ .0 => _19, .1 => _20, }; // in scope 8 at $DIR/const_debuginfo.rs:+12:9: +12:10
let _13: u32; // in scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
scope 9 {
- debug a => _13; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
+ debug a => const 64_u32; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
}
}
}
}
}
}
}
}
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
_1 = const 1_u8; // scope 0 at $DIR/const_debuginfo.rs:+1:13: +1:16
StorageLive(_2); // scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
_2 = const 2_u8; // scope 1 at $DIR/const_debuginfo.rs:+2:13: +2:16
StorageLive(_3); // scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
_3 = const 3_u8; // scope 2 at $DIR/const_debuginfo.rs:+3:13: +3:16
StorageLive(_4); // scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
StorageLive(_5); // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
StorageLive(_6); // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:16
_6 = const 1_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:16
StorageLive(_7); // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
_7 = const 2_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
_5 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
StorageDead(_7); // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
StorageDead(_6); // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
StorageLive(_8); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
_8 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
_4 = const 6_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:24
StorageDead(_8); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
StorageDead(_5); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
StorageLive(_9); // scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
_9 = const "hello, world!"; // scope 4 at $DIR/const_debuginfo.rs:+6:13: +6:28
// mir::Constant
// + span: $DIR/const_debuginfo.rs:14:13: 14:28
// + literal: Const { ty: &str, val: Value(Slice(..)) }
StorageLive(_16); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
StorageLive(_17); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
StorageLive(_18); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
Deinit(_16); // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
Deinit(_17); // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
Deinit(_18); // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
_16 = const true; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
_17 = const false; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
_18 = const 123_u32; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
StorageLive(_11); // scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
Deinit(_11); // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
((_11 as Some).0: u16) = const 99_u16; // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
discriminant(_11) = 1; // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
StorageLive(_19); // scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
StorageLive(_20); // scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
Deinit(_19); // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
Deinit(_20); // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
_19 = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
_20 = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
StorageLive(_13); // scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
StorageLive(_14); // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:16
_14 = const 32_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:16
StorageLive(_15); // scope 8 at $DIR/const_debuginfo.rs:+13:19: +13:22
_15 = const 32_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:19: +13:22
_13 = const 64_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:22
StorageDead(_15); // scope 8 at $DIR/const_debuginfo.rs:+13:21: +13:22
StorageDead(_14); // scope 8 at $DIR/const_debuginfo.rs:+13:21: +13:22
nop; // scope 0 at $DIR/const_debuginfo.rs:+0:11: +14:2
StorageDead(_13); // scope 8 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_19); // scope 7 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_20); // scope 7 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_11); // scope 6 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_16); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_17); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_18); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_9); // scope 4 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_4); // scope 3 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_3); // scope 2 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_2); // scope 1 at $DIR/const_debuginfo.rs:+14:1: +14:2
StorageDead(_1); // scope 0 at $DIR/const_debuginfo.rs:+14:1: +14:2
return; // scope 0 at $DIR/const_debuginfo.rs:+14:2: +14:2
}
}
|