@@ -30,73 +30,73 @@ impl<T> Deref for MySmartPointer<T> {
30
30
fn explicit_monomorphic_dereference ( ) {
31
31
// Dereference with method call
32
32
let a1 = MyIntPointer { value : 34i64 } ;
33
- let _b1 = a1. deref ( ) ; // $ method =MyIntPointer::deref type=_b1:&T.i64
33
+ let _b1 = a1. deref ( ) ; // $ target =MyIntPointer::deref type=_b1:&T.i64
34
34
35
35
// Dereference with overloaded dereference operator
36
36
let a2 = MyIntPointer { value : 34i64 } ;
37
- let _b2 = * a2; // $ method =MyIntPointer::deref type=_b2:i64
37
+ let _b2 = * a2; // $ target =MyIntPointer::deref type=_b2:i64
38
38
39
39
// Call method on explicitly dereferenced value
40
40
let a3 = MyIntPointer { value : 34i64 } ;
41
- let _b3 = ( * a3) . is_positive ( ) ; // $ method =MyIntPointer::deref method =is_positive type=_b3:bool
41
+ let _b3 = ( * a3) . is_positive ( ) ; // $ target =MyIntPointer::deref target =is_positive type=_b3:bool
42
42
}
43
43
44
44
fn explicit_polymorphic_dereference ( ) {
45
45
// Explicit dereference with type parameter
46
46
let c1 = MySmartPointer { value : 'a' } ;
47
- let _d1 = c1. deref ( ) ; // $ method =MySmartPointer::deref type=_d1:&T.char
47
+ let _d1 = c1. deref ( ) ; // $ target =MySmartPointer::deref type=_d1:&T.char
48
48
49
49
// Explicit dereference with type parameter
50
50
let c2 = MySmartPointer { value : 'a' } ;
51
- let _d2 = * c2; // $ method =MySmartPointer::deref type=_d2:char
51
+ let _d2 = * c2; // $ target =MySmartPointer::deref type=_d2:char
52
52
53
53
// Call method on explicitly dereferenced value with type parameter
54
54
let c3 = MySmartPointer { value : 34i64 } ;
55
- let _d3 = ( * c3) . is_positive ( ) ; // $ method =MySmartPointer::deref method =is_positive type=_d3:bool
55
+ let _d3 = ( * c3) . is_positive ( ) ; // $ target =MySmartPointer::deref target =is_positive type=_d3:bool
56
56
}
57
57
58
58
fn explicit_ref_dereference ( ) {
59
59
// Explicit dereference with type parameter
60
60
let e1 = & 'a' ;
61
- let _f1 = e1. deref ( ) ; // $ method =deref MISSING: type=_f1:&T.char
61
+ let _f1 = e1. deref ( ) ; // $ target =deref MISSING: type=_f1:&T.char
62
62
63
63
// Explicit dereference with type parameter
64
64
let e2 = & 'a' ;
65
- let _f2 = * e2; // $ method =deref type=_f2:char
65
+ let _f2 = * e2; // $ target =deref type=_f2:char
66
66
67
67
// Call method on explicitly dereferenced value with type parameter
68
68
let e3 = & 34i64 ;
69
- let _f3 = ( * e3) . is_positive ( ) ; // $ method =deref method =is_positive type=_f3:bool
69
+ let _f3 = ( * e3) . is_positive ( ) ; // $ target =deref target =is_positive type=_f3:bool
70
70
}
71
71
72
72
fn explicit_box_dereference ( ) {
73
73
// Explicit dereference with type parameter
74
- let g1: Box < char > = Box :: new ( 'a' ) ; // $ method =new
75
- let _h1 = g1. deref ( ) ; // $ method =deref type=_h1:&T.char
74
+ let g1: Box < char > = Box :: new ( 'a' ) ; // $ target =new
75
+ let _h1 = g1. deref ( ) ; // $ target =deref type=_h1:&T.char
76
76
77
77
// Explicit dereference with type parameter
78
- let g2: Box < char > = Box :: new ( 'a' ) ; // $ method =new
79
- let _h2 = * g2; // $ method =deref type=_h2:char
78
+ let g2: Box < char > = Box :: new ( 'a' ) ; // $ target =new
79
+ let _h2 = * g2; // $ target =deref type=_h2:char
80
80
81
81
// Call method on explicitly dereferenced value with type parameter
82
- let g3: Box < i64 > = Box :: new ( 34i64 ) ; // $ method =new
83
- let _h3 = ( * g3) . is_positive ( ) ; // $ method =deref method =is_positive type=_h3:bool
82
+ let g3: Box < i64 > = Box :: new ( 34i64 ) ; // $ target =new
83
+ let _h3 = ( * g3) . is_positive ( ) ; // $ target =deref target =is_positive type=_h3:bool
84
84
}
85
85
86
86
fn implicit_dereference ( ) {
87
87
// Call method on implicitly dereferenced value
88
88
let x = MyIntPointer { value : 34i64 } ;
89
- let _y = x. is_positive ( ) ; // $ MISSING: method =is_positive type=_y:bool
89
+ let _y = x. is_positive ( ) ; // $ MISSING: target =is_positive type=_y:bool
90
90
91
91
// Call method on implicitly dereferenced value
92
92
let x = MySmartPointer { value : 34i64 } ;
93
- let _y = x. is_positive ( ) ; // $ MISSING: method =is_positive type=_y:bool
93
+ let _y = x. is_positive ( ) ; // $ MISSING: target =is_positive type=_y:bool
94
94
}
95
95
96
96
pub fn test ( ) {
97
- explicit_monomorphic_dereference ( ) ; // $ method =explicit_monomorphic_dereference
98
- explicit_polymorphic_dereference ( ) ; // $ method =explicit_polymorphic_dereference
99
- explicit_ref_dereference ( ) ; // $ method =explicit_ref_dereference
100
- explicit_box_dereference ( ) ; // $ method =explicit_box_dereference
101
- implicit_dereference ( ) ; // $ method =implicit_dereference
97
+ explicit_monomorphic_dereference ( ) ; // $ target =explicit_monomorphic_dereference
98
+ explicit_polymorphic_dereference ( ) ; // $ target =explicit_polymorphic_dereference
99
+ explicit_ref_dereference ( ) ; // $ target =explicit_ref_dereference
100
+ explicit_box_dereference ( ) ; // $ target =explicit_box_dereference
101
+ implicit_dereference ( ) ; // $ target =implicit_dereference
102
102
}
0 commit comments