@@ -2322,18 +2322,29 @@ impl<'a> Parser<'a> {
23222322 -> PResult < ' a , P < Expr > > {
23232323 let attrs = try!( self . parse_or_use_outer_attributes ( already_parsed_attrs) ) ;
23242324
2325+ let interp = if let token:: Interpolated ( ..) = self . token {
2326+ true
2327+ } else {
2328+ false
2329+ } ;
23252330 let b = try!( self . parse_bottom_expr ( ) ) ;
2326- self . parse_dot_or_call_expr_with ( b, attrs)
2331+ let lo = if interp {
2332+ self . last_span . lo
2333+ } else {
2334+ b. span . lo
2335+ } ;
2336+ self . parse_dot_or_call_expr_with ( b, lo, attrs)
23272337 }
23282338
23292339 pub fn parse_dot_or_call_expr_with ( & mut self ,
23302340 e0 : P < Expr > ,
2341+ lo : BytePos ,
23312342 attrs : ThinAttributes )
23322343 -> PResult < ' a , P < Expr > > {
23332344 // Stitch the list of outer attributes onto the return value.
23342345 // A little bit ugly, but the best way given the current code
23352346 // structure
2336- self . parse_dot_or_call_expr_with_ ( e0)
2347+ self . parse_dot_or_call_expr_with_ ( e0, lo )
23372348 . map ( |expr|
23382349 expr. map ( |mut expr| {
23392350 expr. attrs . update ( |a| a. prepend ( attrs) ) ;
@@ -2408,9 +2419,8 @@ impl<'a> Parser<'a> {
24082419 } )
24092420 }
24102421
2411- fn parse_dot_or_call_expr_with_ ( & mut self , e0 : P < Expr > ) -> PResult < ' a , P < Expr > > {
2422+ fn parse_dot_or_call_expr_with_ ( & mut self , e0 : P < Expr > , lo : BytePos ) -> PResult < ' a , P < Expr > > {
24122423 let mut e = e0;
2413- let lo = e. span . lo ;
24142424 let mut hi;
24152425 loop {
24162426 // expr.f
@@ -3828,7 +3838,8 @@ impl<'a> Parser<'a> {
38283838 let e = self . mk_mac_expr ( span. lo , span. hi ,
38293839 mac. and_then ( |m| m. node ) ,
38303840 None ) ;
3831- let e = try!( self . parse_dot_or_call_expr_with ( e, attrs) ) ;
3841+ let lo = e. span . lo ;
3842+ let e = try!( self . parse_dot_or_call_expr_with ( e, lo, attrs) ) ;
38323843 let e = try!( self . parse_assoc_expr_with ( 0 , LhsExpr :: AlreadyParsed ( e) ) ) ;
38333844 try!( self . handle_expression_like_statement (
38343845 e,
0 commit comments