blob: 01be1f3907ca28a1c364eaea48ff081b3b264575 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// MIR for `test2` after Inline
fn test2(_1: &dyn X) -> bool {
debug x => _1; // in scope 0 at $DIR/inline-trait-method_2.rs:4:10: 4:11
let mut _0: bool; // return place in scope 0 at $DIR/inline-trait-method_2.rs:4:24: 4:28
let mut _2: &dyn X; // in scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
let mut _3: &dyn X; // in scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
scope 1 (inlined test) { // at $DIR/inline-trait-method_2.rs:5:5: 5:12
debug x => _2; // in scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
let mut _4: &dyn X; // in scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
StorageLive(_3); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
_3 = &(*_1); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
_2 = move _3 as &dyn X (Pointer(Unsize)); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
StorageDead(_3); // scope 0 at $DIR/inline-trait-method_2.rs:5:10: 5:11
StorageLive(_4); // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
_4 = _2; // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
_0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
// mir::Constant
// + span: $DIR/inline-trait-method_2.rs:5:5: 5:12
// + literal: Const { ty: for<'r> fn(&'r dyn X) -> bool {<dyn X as X>::y}, val: Value(Scalar(<ZST>)) }
}
bb1: {
StorageDead(_4); // scope 1 at $DIR/inline-trait-method_2.rs:5:5: 5:12
StorageDead(_2); // scope 0 at $DIR/inline-trait-method_2.rs:5:11: 5:12
return; // scope 0 at $DIR/inline-trait-method_2.rs:6:2: 6:2
}
}
|