mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
36 lines
691 B
Rust
36 lines
691 B
Rust
// MIR for `opt2` after SimplifyCfg-initial
|
|
|
|
fn opt2(_1: &Result<u32, Void>) -> &u32 {
|
|
debug res => _1;
|
|
let mut _0: &u32;
|
|
let mut _2: isize;
|
|
let _3: &u32;
|
|
scope 1 {
|
|
debug x => _3;
|
|
}
|
|
|
|
bb0: {
|
|
PlaceMention(_1);
|
|
_2 = discriminant((*_1));
|
|
switchInt(move _2) -> [0: bb2, 1: bb3, otherwise: bb1];
|
|
}
|
|
|
|
bb1: {
|
|
FakeRead(ForMatchedPlace(None), _1);
|
|
unreachable;
|
|
}
|
|
|
|
bb2: {
|
|
StorageLive(_3);
|
|
_3 = &(((*_1) as Ok).0: u32);
|
|
_0 = &(*_3);
|
|
StorageDead(_3);
|
|
return;
|
|
}
|
|
|
|
bb3: {
|
|
FakeRead(ForMatchedPlace(None), (((*_1) as Err).0: Void));
|
|
unreachable;
|
|
}
|
|
}
|