mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
38 lines
672 B
Rust
38 lines
672 B
Rust
// MIR for `option_direct` after PreCodegen
|
|
|
|
fn option_direct(_1: Option<u32>) -> Option<u32> {
|
|
debug x => _1;
|
|
let mut _0: std::option::Option<u32>;
|
|
let mut _2: isize;
|
|
let _3: u32;
|
|
let mut _4: u32;
|
|
scope 1 {
|
|
debug x => _3;
|
|
}
|
|
|
|
bb0: {
|
|
_2 = discriminant(_1);
|
|
switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4];
|
|
}
|
|
|
|
bb1: {
|
|
_0 = Option::<u32>::None;
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb2: {
|
|
_3 = copy ((_1 as Some).0: u32);
|
|
_4 = Not(copy _3);
|
|
_0 = Option::<u32>::Some(move _4);
|
|
goto -> bb3;
|
|
}
|
|
|
|
bb3: {
|
|
return;
|
|
}
|
|
|
|
bb4: {
|
|
unreachable;
|
|
}
|
|
}
|