@@ -556,7 +556,8 @@ impl BorrowckCtxt {
556556 move_data:: MoveExpr => {
557557 let ( expr_ty, expr_span) = match self . tcx . map . find ( move . id) {
558558 Some ( ast_map:: NodeExpr ( expr) ) => {
559- ( ty:: expr_ty_adjusted ( self . tcx , expr) , expr. span )
559+ ( ty:: expr_ty_adjusted ( self . tcx , expr,
560+ self . method_map . borrow ( ) . get ( ) ) , expr. span )
560561 }
561562 r => self . tcx . sess . bug ( format ! ( "MoveExpr({:?}) maps to {:?}, not Expr" ,
562563 move. id, r) )
@@ -582,7 +583,8 @@ impl BorrowckCtxt {
582583 move_data:: Captured => {
583584 let ( expr_ty, expr_span) = match self . tcx . map . find ( move . id) {
584585 Some ( ast_map:: NodeExpr ( expr) ) => {
585- ( ty:: expr_ty_adjusted ( self . tcx , expr) , expr. span )
586+ ( ty:: expr_ty_adjusted ( self . tcx , expr,
587+ self . method_map . borrow ( ) . get ( ) ) , expr. span )
586588 }
587589 r => self . tcx . sess . bug ( format ! ( "Captured({:?}) maps to {:?}, not Expr" ,
588590 move. id, r) )
@@ -922,8 +924,8 @@ impl mc::Typer for TcxTyper {
922924 Ok ( ty:: node_id_to_type ( self . tcx , id) )
923925 }
924926
925- fn node_method_ty ( & mut self , id : ast :: NodeId ) -> Option < ty:: t > {
926- self . method_map . borrow ( ) . get ( ) . find ( & id ) . map ( |method| method. ty )
927+ fn node_method_ty ( & mut self , method_call : typeck :: MethodCall ) -> Option < ty:: t > {
928+ self . method_map . borrow ( ) . get ( ) . find ( & method_call ) . map ( |method| method. ty )
927929 }
928930
929931 fn adjustment ( & mut self , id : ast:: NodeId ) -> Option < @ty:: AutoAdjustment > {
@@ -932,7 +934,7 @@ impl mc::Typer for TcxTyper {
932934 }
933935
934936 fn is_method_call ( & mut self , id : ast:: NodeId ) -> bool {
935- self . method_map . borrow ( ) . get ( ) . contains_key ( & id )
937+ self . method_map . borrow ( ) . get ( ) . contains_key ( & typeck :: MethodCall :: expr ( id ) )
936938 }
937939
938940 fn temporary_scope ( & mut self , id : ast:: NodeId ) -> Option < ast:: NodeId > {
0 commit comments