2023-02-05 13:10:33 -06:00
|
|
|
// MIR for `vec_move` after PreCodegen
|
|
|
|
|
|
|
|
fn vec_move(_1: Vec<impl Sized>) -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug v => _1;
|
|
|
|
let mut _0: ();
|
|
|
|
let mut _2: std::vec::IntoIter<impl Sized>;
|
|
|
|
let mut _3: std::vec::IntoIter<impl Sized>;
|
|
|
|
let mut _4: &mut std::vec::IntoIter<impl Sized>;
|
|
|
|
let mut _5: std::option::Option<impl Sized>;
|
|
|
|
let mut _6: isize;
|
|
|
|
let _8: ();
|
2023-02-05 13:10:33 -06:00
|
|
|
scope 1 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug iter => _3;
|
|
|
|
let _7: impl Sized;
|
2023-02-05 13:10:33 -06:00
|
|
|
scope 2 {
|
2023-06-06 08:47:00 -05:00
|
|
|
debug x => _7;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_2);
|
|
|
|
_2 = <Vec<impl Sized> as IntoIterator>::into_iter(move _1) -> bb1;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_3);
|
|
|
|
_3 = move _2;
|
|
|
|
goto -> bb2;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_5);
|
|
|
|
_4 = &mut _3;
|
|
|
|
_5 = <std::vec::IntoIter<impl Sized> as Iterator>::next(_4) -> [return: bb3, unwind: bb9];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_6 = discriminant(_5);
|
|
|
|
switchInt(move _6) -> [0: bb4, 1: bb6, otherwise: bb8];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_5);
|
|
|
|
drop(_3) -> bb5;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_3);
|
|
|
|
StorageDead(_2);
|
|
|
|
return;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb6: {
|
2023-06-06 08:47:00 -05:00
|
|
|
_7 = move ((_5 as Some).0: impl Sized);
|
|
|
|
_8 = opaque::<impl Sized>(move _7) -> [return: bb7, unwind: bb9];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb7: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageDead(_5);
|
|
|
|
goto -> bb2;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb8: {
|
2023-06-06 08:47:00 -05:00
|
|
|
unreachable;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb9 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
drop(_3) -> [return: bb10, unwind terminate];
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb10 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2023-02-05 13:10:33 -06:00
|
|
|
}
|
|
|
|
}
|