blob: 5ba417a5b0fdd2f6294869608ffb2162a15589a1 (
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
38
|
- // MIR for `main` before ConstProp
+ // MIR for `main` after ConstProp
fn main() -> () {
let mut _0: ();
let _1: i32;
let mut _3: u32;
scope 1 {
debug x => _1;
let _2: i32;
scope 2 {
debug y => _2;
scope 3 {
debug z => _3;
}
}
}
bb0: {
StorageLive(_1);
assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
}
bb1: {
_1 = const 4_i32;
StorageLive(_2);
assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
}
bb2: {
_2 = const 3_i32;
_3 = const 42_u32;
StorageDead(_2);
StorageDead(_1);
return;
}
}
|