@@ -2117,9 +2117,7 @@ fn try_overloaded_call<'a>(fcx: &FnCtxt,
2117
2117
method_name,
2118
2118
function_trait,
2119
2119
callee_type,
2120
- [ ] ,
2121
- DontAutoderefReceiver ,
2122
- IgnoreStaticMethods ) {
2120
+ [ ] ) {
2123
2121
None => continue ,
2124
2122
Some ( method_callee) => method_callee,
2125
2123
} ;
@@ -2160,7 +2158,7 @@ fn try_overloaded_deref(fcx: &FnCtxt,
2160
2158
( PreferMutLvalue , Some ( trait_did) ) => {
2161
2159
method:: lookup_in_trait( fcx, span, base_expr. map( |x| & * x) ,
2162
2160
token:: intern( "deref_mut" ) , trait_did,
2163
- base_ty, [ ] , DontAutoderefReceiver , IgnoreStaticMethods )
2161
+ base_ty, [ ] )
2164
2162
}
2165
2163
_ => None
2166
2164
} ;
@@ -2170,7 +2168,7 @@ fn try_overloaded_deref(fcx: &FnCtxt,
2170
2168
( None , Some ( trait_did) ) => {
2171
2169
method:: lookup_in_trait( fcx, span, base_expr. map( |x| & * x) ,
2172
2170
token:: intern( "deref" ) , trait_did,
2173
- base_ty, [ ] , DontAutoderefReceiver , IgnoreStaticMethods )
2171
+ base_ty, [ ] )
2174
2172
}
2175
2173
( method, _) => method
2176
2174
} ;
@@ -2231,9 +2229,7 @@ fn try_overloaded_slice(fcx: &FnCtxt,
2231
2229
token:: intern( method_name) ,
2232
2230
trait_did,
2233
2231
base_ty,
2234
- [ ] ,
2235
- DontAutoderefReceiver ,
2236
- IgnoreStaticMethods )
2232
+ [ ] )
2237
2233
}
2238
2234
_ => None ,
2239
2235
}
@@ -2256,9 +2252,7 @@ fn try_overloaded_slice(fcx: &FnCtxt,
2256
2252
token:: intern( method_name) ,
2257
2253
trait_did,
2258
2254
base_ty,
2259
- [ ] ,
2260
- DontAutoderefReceiver ,
2261
- IgnoreStaticMethods )
2255
+ [ ] )
2262
2256
}
2263
2257
_ => None ,
2264
2258
}
@@ -2314,9 +2308,7 @@ fn try_overloaded_index(fcx: &FnCtxt,
2314
2308
token:: intern( "index_mut" ) ,
2315
2309
trait_did,
2316
2310
base_ty,
2317
- [ ] ,
2318
- DontAutoderefReceiver ,
2319
- IgnoreStaticMethods )
2311
+ [ ] )
2320
2312
}
2321
2313
_ => None ,
2322
2314
} ;
@@ -2330,9 +2322,7 @@ fn try_overloaded_index(fcx: &FnCtxt,
2330
2322
token:: intern( "index" ) ,
2331
2323
trait_did,
2332
2324
base_ty,
2333
- [ ] ,
2334
- DontAutoderefReceiver ,
2335
- IgnoreStaticMethods )
2325
+ [ ] )
2336
2326
}
2337
2327
( method, _) => method,
2338
2328
} ;
@@ -2376,9 +2366,7 @@ fn lookup_method_for_for_loop(fcx: &FnCtxt,
2376
2366
token:: intern( "next" ) ,
2377
2367
trait_did,
2378
2368
expr_type,
2379
- [ ] ,
2380
- DontAutoderefReceiver ,
2381
- IgnoreStaticMethods ) ;
2369
+ [ ] ) ;
2382
2370
2383
2371
// Regardless of whether the lookup succeeds, check the method arguments
2384
2372
// so that we have *some* type for each argument.
@@ -3069,13 +3057,11 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
3069
3057
trait_did : Option < ast:: DefId > ,
3070
3058
lhs : & ' a ast:: Expr ,
3071
3059
rhs : Option < & P < ast:: Expr > > ,
3072
- autoderef_receiver : AutoderefReceiverFlag ,
3073
3060
unbound_method: ||) -> ty:: t {
3074
3061
let method = match trait_did {
3075
3062
Some ( trait_did) => {
3076
3063
method:: lookup_in_trait ( fcx , op_ex . span, Some ( lhs ) , opname ,
3077
- trait_did , lhs_ty , & [ ] , autoderef_receiver ,
3078
- IgnoreStaticMethods )
3064
+ trait_did , lhs_ty , & [ ] )
3079
3065
}
3080
3066
None => None
3081
3067
} ;
@@ -3249,7 +3235,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
3249
3235
}
3250
3236
} ;
3251
3237
lookup_op_method ( fcx, ex, lhs_resolved_t, token:: intern ( name) ,
3252
- trait_did, lhs_expr, Some ( rhs) , DontAutoderefReceiver , || {
3238
+ trait_did, lhs_expr, Some ( rhs) , || {
3253
3239
fcx. type_error_message ( ex. span , |actual| {
3254
3240
format ! ( "binary operation `{}` cannot be applied to type `{}`" ,
3255
3241
ast_util:: binop_to_string( op) ,
@@ -3266,7 +3252,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
3266
3252
rhs_expr : & ast:: Expr ,
3267
3253
rhs_t : ty:: t ) -> ty:: t {
3268
3254
lookup_op_method ( fcx, ex, rhs_t, token:: intern ( mname) ,
3269
- trait_did, rhs_expr, None , DontAutoderefReceiver , || {
3255
+ trait_did, rhs_expr, None , || {
3270
3256
fcx. type_error_message ( ex. span , |actual| {
3271
3257
format ! ( "cannot apply unary operator `{}` to type `{}`" ,
3272
3258
op_str, actual)
0 commit comments