mirror of https://github.com/rust-lang/rust
188 lines
3.5 KiB
Rust
188 lines
3.5 KiB
Rust
// MIR for `main` after built
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let mut _1: i32;
|
|
let mut _2: std::option::Option<i32>;
|
|
let mut _3: &std::option::Option<i32>;
|
|
let mut _4: isize;
|
|
let mut _5: isize;
|
|
let _6: i32;
|
|
let _7: &i32;
|
|
let mut _8: bool;
|
|
let _9: std::option::Option<i32>;
|
|
let _10: i32;
|
|
let _11: &i32;
|
|
let mut _12: bool;
|
|
let mut _13: i32;
|
|
let _14: std::option::Option<i32>;
|
|
scope 1 {
|
|
}
|
|
scope 2 {
|
|
debug _w => _6;
|
|
debug _w => _7;
|
|
}
|
|
scope 3 {
|
|
debug _x => _9;
|
|
}
|
|
scope 4 {
|
|
debug y => _10;
|
|
debug y => _11;
|
|
}
|
|
scope 5 {
|
|
debug _z => _14;
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_1);
|
|
StorageLive(_2);
|
|
_2 = Option::<i32>::Some(const 1_i32);
|
|
PlaceMention(_2);
|
|
_4 = discriminant(_2);
|
|
switchInt(move _4) -> [1: bb2, otherwise: bb1];
|
|
}
|
|
|
|
bb1: {
|
|
falseEdge -> [real: bb11, imaginary: bb4];
|
|
}
|
|
|
|
bb2: {
|
|
falseEdge -> [real: bb12, imaginary: bb1];
|
|
}
|
|
|
|
bb3: {
|
|
goto -> bb1;
|
|
}
|
|
|
|
bb4: {
|
|
_5 = discriminant(_2);
|
|
switchInt(move _5) -> [1: bb6, otherwise: bb5];
|
|
}
|
|
|
|
bb5: {
|
|
StorageLive(_14);
|
|
_14 = copy _2;
|
|
_1 = const 4_i32;
|
|
StorageDead(_14);
|
|
goto -> bb22;
|
|
}
|
|
|
|
bb6: {
|
|
falseEdge -> [real: bb9, imaginary: bb5];
|
|
}
|
|
|
|
bb7: {
|
|
goto -> bb5;
|
|
}
|
|
|
|
bb8: {
|
|
FakeRead(ForMatchedPlace(None), _2);
|
|
unreachable;
|
|
}
|
|
|
|
bb9: {
|
|
StorageLive(_11);
|
|
_11 = &((_2 as Some).0: i32);
|
|
_3 = &fake shallow _2;
|
|
StorageLive(_12);
|
|
StorageLive(_13);
|
|
_13 = copy (*_11);
|
|
_12 = guard2(move _13) -> [return: bb18, unwind: bb24];
|
|
}
|
|
|
|
bb10: {
|
|
falseEdge -> [real: bb7, imaginary: bb5];
|
|
}
|
|
|
|
bb11: {
|
|
StorageLive(_9);
|
|
_9 = copy _2;
|
|
_1 = const 2_i32;
|
|
StorageDead(_9);
|
|
goto -> bb22;
|
|
}
|
|
|
|
bb12: {
|
|
StorageLive(_7);
|
|
_7 = &((_2 as Some).0: i32);
|
|
_3 = &fake shallow _2;
|
|
StorageLive(_8);
|
|
_8 = guard() -> [return: bb14, unwind: bb24];
|
|
}
|
|
|
|
bb13: {
|
|
falseEdge -> [real: bb3, imaginary: bb1];
|
|
}
|
|
|
|
bb14: {
|
|
switchInt(move _8) -> [0: bb16, otherwise: bb15];
|
|
}
|
|
|
|
bb15: {
|
|
StorageDead(_8);
|
|
FakeRead(ForMatchGuard, _3);
|
|
FakeRead(ForGuardBinding, _7);
|
|
StorageLive(_6);
|
|
_6 = copy ((_2 as Some).0: i32);
|
|
_1 = const 1_i32;
|
|
StorageDead(_6);
|
|
StorageDead(_7);
|
|
goto -> bb22;
|
|
}
|
|
|
|
bb16: {
|
|
goto -> bb17;
|
|
}
|
|
|
|
bb17: {
|
|
StorageDead(_8);
|
|
StorageDead(_7);
|
|
goto -> bb13;
|
|
}
|
|
|
|
bb18: {
|
|
switchInt(move _12) -> [0: bb20, otherwise: bb19];
|
|
}
|
|
|
|
bb19: {
|
|
StorageDead(_13);
|
|
StorageDead(_12);
|
|
FakeRead(ForMatchGuard, _3);
|
|
FakeRead(ForGuardBinding, _11);
|
|
StorageLive(_10);
|
|
_10 = copy ((_2 as Some).0: i32);
|
|
_1 = const 3_i32;
|
|
StorageDead(_10);
|
|
StorageDead(_11);
|
|
goto -> bb22;
|
|
}
|
|
|
|
bb20: {
|
|
goto -> bb21;
|
|
}
|
|
|
|
bb21: {
|
|
StorageDead(_13);
|
|
StorageDead(_12);
|
|
StorageDead(_11);
|
|
goto -> bb10;
|
|
}
|
|
|
|
bb22: {
|
|
PlaceMention(_1);
|
|
StorageDead(_2);
|
|
StorageDead(_1);
|
|
_0 = const ();
|
|
return;
|
|
}
|
|
|
|
bb23: {
|
|
FakeRead(ForMatchedPlace(None), _1);
|
|
unreachable;
|
|
}
|
|
|
|
bb24 (cleanup): {
|
|
resume;
|
|
}
|
|
}
|