]> git.proxmox.com Git - rustc.git/blame - tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff
New upstream version 1.74.1+dfsg1
[rustc.git] / tests / mir-opt / const_prop / indirect.main.ConstProp.panic-unwind.diff
CommitLineData
fe692bf9
FG
1- // MIR for `main` before ConstProp
2+ // MIR for `main` after ConstProp
3
4 fn main() -> () {
5 let mut _0: ();
6 let _1: u8;
7 let mut _2: u8;
8 let mut _3: (u8, bool);
9 scope 1 {
10 debug x => _1;
11 }
12
13 bb0: {
14 StorageLive(_1);
15 StorageLive(_2);
16- _2 = const 2_u32 as u8 (IntToInt);
17- _3 = CheckedAdd(_2, const 1_u8);
18- assert(!move (_3.1: bool), "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> [success: bb1, unwind continue];
19+ _2 = const 2_u8;
20+ _3 = const (3_u8, false);
add651ee 21+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_u8, const 1_u8) -> [success: bb1, unwind continue];
fe692bf9
FG
22 }
23
24 bb1: {
25- _1 = move (_3.0: u8);
26+ _1 = const 3_u8;
27 StorageDead(_2);
28 _0 = const ();
29 StorageDead(_1);
30 return;
31 }
781aab86
FG
32+ }
33+
34+ alloc3 (size: 2, align: 1) {
35+ 03 00 │ ..
fe692bf9
FG
36 }
37