We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13170cd commit d748d1dCopy full SHA for d748d1d
tests/ui-fulldeps/pprust-parenthesis-insertion.rs
@@ -61,6 +61,9 @@ static EXPRS: &[&str] = &[
61
"(2 + 2) * 2",
62
"2 * (2 + 2)",
63
"2 + 2 + 2",
64
+ // Right-associative operator.
65
+ "2 += 2 += 2",
66
+ "(2 += 2) += 2",
67
// Return has lower precedence than a binary operator.
68
"(return 2) + 2",
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)",
100
// Grammar restriction: the value in let-else is not allowed to end in a
101
// curly brace.
102
"{ let _ = 1 + 1 else {}; }",
0 commit comments