We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c46cb00 commit a593a6cCopy full SHA for a593a6c
tests/ui-fulldeps/pprust-parenthesis-insertion.rs
@@ -94,6 +94,12 @@ static EXPRS: &[&str] = &[
94
"#[attr] (1 as T)",
95
"#[attr] (x = 1)",
96
"#[attr] (x += 1)",
97
+ // If the attribute were not present on the binary operation, it would be
98
+ // legal to render this without not just the inner parentheses, but also the
99
+ // outer ones. `return x + .. .field` (Yes, really.) Currently the
100
+ // pretty-printer does not take advantage of this edge case.
101
+ "(return #[attr] (x + ..)).field",
102
+ "(return x + ..).field",
103
// Grammar restriction: break value starting with a labeled loop is not
104
// allowed, except if the break is also labeled.
105
"break 'outer 'inner: loop {} + 2",
0 commit comments