@@ -1722,7 +1722,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
1722
1722
}
1723
1723
_ => {
1724
1724
fcx. tcx( ) . sess. span_bug(
1725
- sp ,
1725
+ callee_expr . span ,
1726
1726
format ! ( "method without bare fn type" ) ) ;
1727
1727
}
1728
1728
}
@@ -1936,7 +1936,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
1936
1936
// Checks a method call.
1937
1937
fn check_method_call ( fcx : & FnCtxt ,
1938
1938
expr : & ast:: Expr ,
1939
- method_name : ast:: Ident ,
1939
+ method_name : ast:: SpannedIdent ,
1940
1940
args : & [ @ast:: Expr ] ,
1941
1941
tps : & [ ast:: P < ast:: Ty > ] ) {
1942
1942
let rcvr = args[ 0 ] ;
@@ -1952,7 +1952,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
1952
1952
1953
1953
let tps = tps. iter ( ) . map ( |& ast_ty| fcx. to_ty ( ast_ty) ) . collect :: < Vec < _ > > ( ) ;
1954
1954
let fn_ty = match method:: lookup ( fcx, expr, rcvr,
1955
- method_name. name ,
1955
+ method_name. node . name ,
1956
1956
expr_t, tps. as_slice ( ) ,
1957
1957
DontDerefArgs ,
1958
1958
CheckTraitsAndInherentMethods ,
@@ -1966,11 +1966,10 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
1966
1966
None => {
1967
1967
debug ! ( "(checking method call) failing expr is {}" , expr. id) ;
1968
1968
1969
- fcx. type_error_message ( expr . span ,
1969
+ fcx. type_error_message ( method_name . span ,
1970
1970
|actual| {
1971
- format ! ( "type `{}` does not implement any method in scope \
1972
- named `{}`",
1973
- actual, token:: get_ident( method_name) )
1971
+ format ! ( "type `{}` does not implement any method in scope named `{}`" ,
1972
+ actual, token:: get_ident( method_name. node) )
1974
1973
} ,
1975
1974
expr_t,
1976
1975
None ) ;
@@ -1982,7 +1981,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
1982
1981
} ;
1983
1982
1984
1983
// Call the generic checker.
1985
- let ret_ty = check_method_argument_types ( fcx, expr . span ,
1984
+ let ret_ty = check_method_argument_types ( fcx, method_name . span ,
1986
1985
fn_ty, expr, args,
1987
1986
DontDerefArgs ) ;
1988
1987
0 commit comments