- // MIR for `clone` before Inline + // MIR for `clone` after Inline fn clone(_1: fn(A, B)) -> fn(A, B) { debug f => _1; // in scope 0 at $DIR/inline-shims.rs:5:20: 5:21 let mut _0: fn(A, B); // return place in scope 0 at $DIR/inline-shims.rs:5:36: 5:44 let mut _2: &fn(A, B); // in scope 0 at $DIR/inline-shims.rs:6:5: 6:14 + scope 1 (inlined ::clone - shim(fn(A, B))) { // at $DIR/inline-shims.rs:6:5: 6:14 + } bb0: { StorageLive(_2); // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 _2 = &_1; // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 - _0 = ::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:6:5: 6:14 - // mir::Constant - // + span: $DIR/inline-shims.rs:6:7: 6:12 - // + literal: Const { ty: for<'r> fn(&'r fn(A, B)) -> fn(A, B) {::clone}, val: Value(Scalar()) } - } - - bb1: { + _0 = (*_2); // scope 1 at $DIR/inline-shims.rs:6:5: 6:14 StorageDead(_2); // scope 0 at $DIR/inline-shims.rs:6:13: 6:14 return; // scope 0 at $DIR/inline-shims.rs:7:2: 7:2 } }