57 lines
3.4 KiB
Rust
57 lines
3.4 KiB
Rust
// MIR for `ezmap` after PreCodegen
|
|
|
|
fn ezmap(_1: Option<i32>) -> Option<i32> {
|
|
debug x => _1; // in scope 0 at $DIR/simple_option_map.rs:+0:14: +0:15
|
|
let mut _0: std::option::Option<i32>; // return place in scope 0 at $DIR/simple_option_map.rs:+0:33: +0:44
|
|
let mut _6: i32; // in scope 0 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
scope 1 (inlined map::<i32, i32, [closure@$DIR/simple_option_map.rs:18:12: 18:15]>) { // at $DIR/simple_option_map.rs:18:5: 18:22
|
|
debug slf => _1; // in scope 1 at $DIR/simple_option_map.rs:6:17: 6:20
|
|
debug f => const ZeroSized: [closure@$DIR/simple_option_map.rs:18:12: 18:15]; // in scope 1 at $DIR/simple_option_map.rs:6:33: 6:34
|
|
let mut _2: isize; // in scope 1 at $DIR/simple_option_map.rs:11:9: 11:16
|
|
let _3: i32; // in scope 1 at $DIR/simple_option_map.rs:11:14: 11:15
|
|
let mut _4: i32; // in scope 1 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
let mut _5: (i32,); // in scope 1 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
scope 2 {
|
|
debug x => _3; // in scope 2 at $DIR/simple_option_map.rs:11:14: 11:15
|
|
scope 3 (inlined ezmap::{closure#0}) { // at $DIR/simple_option_map.rs:11:25: 11:29
|
|
debug n => _6; // in scope 3 at $DIR/simple_option_map.rs:+1:13: +1:14
|
|
}
|
|
}
|
|
}
|
|
|
|
bb0: {
|
|
StorageLive(_3); // scope 0 at $DIR/simple_option_map.rs:+1:5: +1:22
|
|
_2 = discriminant(_1); // scope 1 at $DIR/simple_option_map.rs:10:11: 10:14
|
|
switchInt(move _2) -> [0: bb1, 1: bb3, otherwise: bb2]; // scope 1 at $DIR/simple_option_map.rs:10:5: 10:14
|
|
}
|
|
|
|
bb1: {
|
|
_0 = Option::<i32>::None; // scope 1 at $DIR/simple_option_map.rs:12:17: 12:21
|
|
goto -> bb4; // scope 1 at $DIR/simple_option_map.rs:12:17: 12:21
|
|
}
|
|
|
|
bb2: {
|
|
unreachable; // scope 1 at $DIR/simple_option_map.rs:10:11: 10:14
|
|
}
|
|
|
|
bb3: {
|
|
_3 = ((_1 as Some).0: i32); // scope 1 at $DIR/simple_option_map.rs:11:14: 11:15
|
|
StorageLive(_4); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
StorageLive(_5); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
_5 = (move _3,); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
StorageLive(_6); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
_6 = move (_5.0: i32); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
_4 = Add(_6, const 1_i32); // scope 3 at $DIR/simple_option_map.rs:+1:16: +1:21
|
|
StorageDead(_6); // scope 2 at $DIR/simple_option_map.rs:11:25: 11:29
|
|
StorageDead(_5); // scope 2 at $DIR/simple_option_map.rs:11:28: 11:29
|
|
_0 = Option::<i32>::Some(move _4); // scope 2 at $DIR/simple_option_map.rs:11:20: 11:30
|
|
StorageDead(_4); // scope 2 at $DIR/simple_option_map.rs:11:29: 11:30
|
|
goto -> bb4; // scope 1 at $DIR/simple_option_map.rs:14:1: 14:2
|
|
}
|
|
|
|
bb4: {
|
|
StorageDead(_3); // scope 0 at $DIR/simple_option_map.rs:+1:5: +1:22
|
|
return; // scope 0 at $DIR/simple_option_map.rs:+2:2: +2:2
|
|
}
|
|
}
|