File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ static EXPRS: &[&str] = &[
61
61
"(2 + 2) * 2" ,
62
62
"2 * (2 + 2)" ,
63
63
"2 + 2 + 2" ,
64
+ // Right-associative operator.
65
+ "2 += 2 += 2" ,
66
+ "(2 += 2) += 2" ,
64
67
// Return has lower precedence than a binary operator.
65
68
"(return 2) + 2" ,
66
69
"2 + (return 2)" , // FIXME: no parenthesis needed.
@@ -89,6 +92,11 @@ static EXPRS: &[&str] = &[
89
92
// allowed, except if the break is also labeled.
90
93
"break 'outer 'inner: loop {} + 2" ,
91
94
"break ('inner: loop {} + 2)" ,
95
+ // Grammar restriction: ranges cannot be the endpoint of another range.
96
+ "(2..2)..2" ,
97
+ "2..(2..2)" ,
98
+ "(2..2).." ,
99
+ "..(2..2)" ,
92
100
// Grammar restriction: the value in let-else is not allowed to end in a
93
101
// curly brace.
94
102
"{ let _ = 1 + 1 else {}; }" ,
You can’t perform that action at this time.
0 commit comments