File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2738,14 +2738,15 @@ impl<'a> Parser<'a> {
2738
2738
// (much lower than other prefix expressions) to be consistent
2739
2739
// with the postfix-form 'expr..'
2740
2740
let lo = self . span . lo ;
2741
+ let mut hi = self . span . hi ;
2741
2742
try!( self . bump ( ) ) ;
2742
2743
let opt_end = if self . is_at_start_of_range_notation_rhs ( ) {
2743
2744
let end = try!( self . parse_binops ( ) ) ;
2745
+ hi = end. span . hi ;
2744
2746
Some ( end)
2745
2747
} else {
2746
2748
None
2747
2749
} ;
2748
- let hi = self . span . hi ;
2749
2750
let ex = self . mk_range ( None , opt_end) ;
2750
2751
Ok ( self . mk_expr ( lo, hi, ex) )
2751
2752
}
@@ -2787,17 +2788,17 @@ impl<'a> Parser<'a> {
2787
2788
}
2788
2789
// A range expression, either `expr..expr` or `expr..`.
2789
2790
token:: DotDot => {
2791
+ let lo = lhs. span . lo ;
2792
+ let mut hi = self . span . hi ;
2790
2793
try!( self . bump ( ) ) ;
2791
2794
2792
2795
let opt_end = if self . is_at_start_of_range_notation_rhs ( ) {
2793
2796
let end = try!( self . parse_binops ( ) ) ;
2797
+ hi = end. span . hi ;
2794
2798
Some ( end)
2795
2799
} else {
2796
2800
None
2797
2801
} ;
2798
-
2799
- let lo = lhs. span . lo ;
2800
- let hi = self . span . hi ;
2801
2802
let range = self . mk_range ( Some ( lhs) , opt_end) ;
2802
2803
return Ok ( self . mk_expr ( lo, hi, range) ) ;
2803
2804
}
You can’t perform that action at this time.
0 commit comments