// MIR for `test2` after Inline fn test2(_1: &dyn X) -> bool { debug x => _1; // in scope 0 at $DIR/inline_trait_method_2.rs:+0:10: +0:11 let mut _0: bool; // return place in scope 0 at $DIR/inline_trait_method_2.rs:+0:24: +0:28 let mut _2: &dyn X; // in scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 let mut _3: &dyn X; // in scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 scope 1 (inlined test) { // at $DIR/inline_trait_method_2.rs:6:5: 6:12 debug x => _2; // in scope 1 at $DIR/inline_trait_method_2.rs:10:9: 10:10 } bb0: { StorageLive(_2); // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 StorageLive(_3); // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 _3 = &(*_1); // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 _2 = move _3 as &dyn X (Pointer(Unsize)); // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 StorageDead(_3); // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11 _0 = ::y(_2) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/inline_trait_method_2.rs:11:5: 11:10 // mir::Constant // + span: $DIR/inline_trait_method_2.rs:11:7: 11:8 // + literal: Const { ty: for<'a> fn(&'a dyn X) -> bool {::y}, val: Value() } } bb1: { StorageDead(_2); // scope 0 at $DIR/inline_trait_method_2.rs:+1:11: +1:12 return; // scope 0 at $DIR/inline_trait_method_2.rs:+2:2: +2:2 } }