@@ -53,18 +53,12 @@ pub enum CandidateSource {
53
53
54
54
type MethodIndex = uint ; // just for doc purposes
55
55
56
- //struct CacheKey {
57
- // skol_self_ty: ty::t,
58
- // method_name: ast::Name,
59
- //}
60
-
61
- pub fn exists (
62
- fcx : & FnCtxt ,
63
- span : Span ,
64
- method_name : ast:: Name ,
65
- self_ty : ty:: t ,
66
- call_expr_id : ast:: NodeId )
67
- -> bool
56
+ pub fn exists ( fcx : & FnCtxt ,
57
+ span : Span ,
58
+ method_name : ast:: Name ,
59
+ self_ty : ty:: t ,
60
+ call_expr_id : ast:: NodeId )
61
+ -> bool
68
62
{
69
63
/*!
70
64
* Determines whether the type `self_ty` supports a method name `method_name` or not.
@@ -77,15 +71,14 @@ pub fn exists(
77
71
}
78
72
}
79
73
80
- pub fn lookup (
81
- fcx : & FnCtxt ,
82
- span : Span ,
83
- method_name : ast:: Name ,
84
- self_ty : ty:: t ,
85
- supplied_method_types : Vec < ty:: t > ,
86
- call_expr_id : ast:: NodeId ,
87
- self_expr : & ast:: Expr )
88
- -> Result < MethodCallee , MethodError >
74
+ pub fn lookup ( fcx : & FnCtxt ,
75
+ span : Span ,
76
+ method_name : ast:: Name ,
77
+ self_ty : ty:: t ,
78
+ supplied_method_types : Vec < ty:: t > ,
79
+ call_expr_id : ast:: NodeId ,
80
+ self_expr : & ast:: Expr )
81
+ -> Result < MethodCallee , MethodError >
89
82
{
90
83
/*!
91
84
* Performs method lookup. If lookup is successful, it will return the callee
@@ -114,31 +107,29 @@ pub fn lookup(
114
107
Ok ( confirm:: confirm ( fcx, span, self_expr, self_ty, pick, supplied_method_types) )
115
108
}
116
109
117
- pub fn lookup_in_trait < ' a , ' tcx > (
118
- fcx : & ' a FnCtxt < ' a , ' tcx > ,
119
- span : Span ,
120
- self_expr : Option < & ' a ast:: Expr > ,
121
- m_name : ast:: Name ,
122
- trait_def_id : DefId ,
123
- self_ty : ty:: t ,
124
- opt_input_types : Option < Vec < ty:: t > > )
125
- -> Option < MethodCallee >
110
+ pub fn lookup_in_trait < ' a , ' tcx > ( fcx : & ' a FnCtxt < ' a , ' tcx > ,
111
+ span : Span ,
112
+ self_expr : Option < & ' a ast:: Expr > ,
113
+ m_name : ast:: Name ,
114
+ trait_def_id : DefId ,
115
+ self_ty : ty:: t ,
116
+ opt_input_types : Option < Vec < ty:: t > > )
117
+ -> Option < MethodCallee >
126
118
{
127
119
lookup_in_trait_adjusted ( fcx, span, self_expr, m_name, trait_def_id,
128
120
ty:: AutoDerefRef { autoderefs : 0 , autoref : None } ,
129
121
self_ty, opt_input_types)
130
122
}
131
123
132
- pub fn lookup_in_trait_adjusted < ' a , ' tcx > (
133
- fcx : & ' a FnCtxt < ' a , ' tcx > ,
134
- span : Span ,
135
- self_expr : Option < & ' a ast:: Expr > ,
136
- m_name : ast:: Name ,
137
- trait_def_id : DefId ,
138
- autoderefref : ty:: AutoDerefRef ,
139
- self_ty : ty:: t ,
140
- opt_input_types : Option < Vec < ty:: t > > )
141
- -> Option < MethodCallee >
124
+ pub fn lookup_in_trait_adjusted < ' a , ' tcx > ( fcx : & ' a FnCtxt < ' a , ' tcx > ,
125
+ span : Span ,
126
+ self_expr : Option < & ' a ast:: Expr > ,
127
+ m_name : ast:: Name ,
128
+ trait_def_id : DefId ,
129
+ autoderefref : ty:: AutoDerefRef ,
130
+ self_ty : ty:: t ,
131
+ opt_input_types : Option < Vec < ty:: t > > )
132
+ -> Option < MethodCallee >
142
133
{
143
134
debug ! ( "lookup_in_trait_adjusted(self_ty={}, self_expr={}, m_name={}, trait_def_id={})" ,
144
135
self_ty. repr( fcx. tcx( ) ) ,
0 commit comments