2023-11-27 09:40:00 -06:00
|
|
|
// WARNING: This is highly experimental output it's intended for stable-mir developers only.
|
|
|
|
// If you find a bug or want to improve the output open a issue at https://github.com/rust-lang/project-stable-mir.
|
2024-03-20 17:55:35 -05:00
|
|
|
fn foo(_1: i32) -> i32 {
|
|
|
|
let mut _0: i32;
|
|
|
|
let mut _2: (i32, bool);
|
|
|
|
debug i => _1;
|
|
|
|
bb0: {
|
|
|
|
_2 = CheckedAdd(_1, 1_i32);
|
|
|
|
assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", _1, 1_i32) -> [success: bb1, unwind continue];
|
|
|
|
}
|
|
|
|
bb1: {
|
|
|
|
_0 = move (_2.0: i32);
|
|
|
|
return;
|
|
|
|
}
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
2024-03-20 17:55:35 -05:00
|
|
|
fn bar(_1: &mut Vec<i32>) -> Vec<i32> {
|
|
|
|
let mut _0: Vec<i32>;
|
|
|
|
let mut _2: Vec<i32>;
|
|
|
|
let mut _3: &Vec<i32>;
|
|
|
|
let _4: ();
|
|
|
|
let mut _5: &mut Vec<i32>;
|
|
|
|
debug vec => _1;
|
|
|
|
debug new_vec => _2;
|
2023-11-27 09:40:00 -06:00
|
|
|
bb0: {
|
2024-03-20 17:55:35 -05:00
|
|
|
_3 = &(*_1);
|
|
|
|
_2 = <Vec<i32> as Clone>::clone(move _3) -> [return: bb1, unwind continue];
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
bb1: {
|
2024-03-20 17:55:35 -05:00
|
|
|
_5 = &mut _2;
|
|
|
|
_4 = Vec::<i32>::push(move _5, 1_i32) -> [return: bb2, unwind: bb3];
|
|
|
|
}
|
|
|
|
bb2: {
|
|
|
|
_0 = move _2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
bb3: {
|
|
|
|
drop(_2) -> [return: bb4, unwind terminate];
|
|
|
|
}
|
|
|
|
bb4: {
|
|
|
|
resume;
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
}
|
2024-03-20 17:55:35 -05:00
|
|
|
fn demux(_1: u8) -> u8 {
|
|
|
|
let mut _0: u8;
|
|
|
|
debug input => _1;
|
2023-11-27 09:40:00 -06:00
|
|
|
bb0: {
|
2024-06-23 08:54:42 -05:00
|
|
|
switchInt(_1) -> [0: bb4, 1: bb3, 2: bb2, otherwise: bb1];
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
bb1: {
|
2024-03-20 17:55:35 -05:00
|
|
|
_0 = 0_u8;
|
|
|
|
goto -> bb5;
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
bb2: {
|
2024-06-23 08:54:42 -05:00
|
|
|
_0 = 8_u8;
|
2024-03-20 17:55:35 -05:00
|
|
|
goto -> bb5;
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
bb3: {
|
2024-03-20 17:55:35 -05:00
|
|
|
_0 = 6_u8;
|
|
|
|
goto -> bb5;
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
bb4: {
|
2024-06-23 08:54:42 -05:00
|
|
|
_0 = 10_u8;
|
2024-03-20 17:55:35 -05:00
|
|
|
goto -> bb5;
|
|
|
|
}
|
|
|
|
bb5: {
|
|
|
|
return;
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
|
|
|
}
|
2024-03-20 17:55:35 -05:00
|
|
|
fn main() -> () {
|
|
|
|
let mut _0: ();
|
2023-11-27 09:40:00 -06:00
|
|
|
bb0: {
|
2024-03-20 17:55:35 -05:00
|
|
|
return;
|
2023-11-27 09:40:00 -06:00
|
|
|
}
|
2024-03-20 17:55:35 -05:00
|
|
|
}
|