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] = &[
6161 "(2 + 2) * 2" ,
6262 "2 * (2 + 2)" ,
6363 "2 + 2 + 2" ,
64+ // Right-associative operator.
65+ "2 += 2 += 2" ,
66+ "(2 += 2) += 2" ,
6467 // Return has lower precedence than a binary operator.
6568 "(return 2) + 2" ,
6669 "2 + (return 2)" , // FIXME: no parenthesis needed.
@@ -89,6 +92,11 @@ static EXPRS: &[&str] = &[
8992 // allowed, except if the break is also labeled.
9093 "break 'outer 'inner: loop {} + 2" ,
9194 "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)" ,
92100 // Grammar restriction: the value in let-else is not allowed to end in a
93101 // curly brace.
94102 "{ let _ = 1 + 1 else {}; }" ,
You can’t perform that action at this time.
0 commit comments