File tree 1 file changed +15
-6
lines changed
1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -2813,16 +2813,25 @@ impl<'a> Parser<'a> {
2813
2813
2814
2814
2815
2815
let rhs = try!( match op. fixity ( ) {
2816
- Fixity :: Right => self . with_res ( restrictions, |this|{
2817
- this. parse_assoc_expr_with ( op. precedence ( ) , LhsExpr :: NotYetParsed )
2816
+ Fixity :: Right => self . with_res (
2817
+ restrictions - Restrictions :: RESTRICTION_STMT_EXPR ,
2818
+ |this| {
2819
+ this. parse_assoc_expr_with ( op. precedence ( ) ,
2820
+ LhsExpr :: NotYetParsed )
2818
2821
} ) ,
2819
- Fixity :: Left => self . with_res ( restrictions, |this|{
2820
- this. parse_assoc_expr_with ( op. precedence ( ) + 1 , LhsExpr :: NotYetParsed )
2822
+ Fixity :: Left => self . with_res (
2823
+ restrictions - Restrictions :: RESTRICTION_STMT_EXPR ,
2824
+ |this| {
2825
+ this. parse_assoc_expr_with ( op. precedence ( ) + 1 ,
2826
+ LhsExpr :: NotYetParsed )
2821
2827
} ) ,
2822
2828
// We currently have no non-associative operators that are not handled above by
2823
2829
// the special cases. The code is here only for future convenience.
2824
- Fixity :: None => self . with_res ( restrictions, |this|{
2825
- this. parse_assoc_expr_with ( op. precedence ( ) + 1 , LhsExpr :: NotYetParsed )
2830
+ Fixity :: None => self . with_res (
2831
+ restrictions - Restrictions :: RESTRICTION_STMT_EXPR ,
2832
+ |this| {
2833
+ this. parse_assoc_expr_with ( op. precedence ( ) + 1 ,
2834
+ LhsExpr :: NotYetParsed )
2826
2835
} ) ,
2827
2836
} ) ;
2828
2837
You can’t perform that action at this time.
0 commit comments