// MIR for `ezmap` after PreCodegen fn ezmap(_1: Option) -> Option { debug x => _1; // in scope 0 at $DIR/simple_option_map.rs:+0:14: +0:15 let mut _0: std::option::Option; // return place in scope 0 at $DIR/simple_option_map.rs:+0:33: +0:44 scope 1 (inlined map::) { // 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 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 => _3; // in scope 3 at $DIR/simple_option_map.rs:+1:13: +1:14 } } } bb0: { _2 = discriminant(_1); // scope 1 at $DIR/simple_option_map.rs:10:11: 10:14 switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb4]; // scope 1 at $DIR/simple_option_map.rs:10:5: 10:14 } bb1: { _0 = Option::::None; // scope 1 at $DIR/simple_option_map.rs:12:17: 12:21 goto -> bb3; // scope 1 at $DIR/simple_option_map.rs:12:17: 12:21 } bb2: { _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 _4 = Add(_3, const 1_i32); // scope 3 at $DIR/simple_option_map.rs:+1:16: +1:21 _0 = Option::::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 -> bb3; // scope 1 at $DIR/simple_option_map.rs:14:1: 14:2 } bb3: { return; // scope 0 at $DIR/simple_option_map.rs:+2:2: +2:2 } bb4: { unreachable; // scope 1 at $DIR/simple_option_map.rs:10:11: 10:14 } }