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 29b5058 commit cf3981dCopy full SHA for cf3981d
tests/ui-fulldeps/pprust-parenthesis-insertion.rs
@@ -98,6 +98,12 @@ static EXPRS: &[&str] = &[
98
"#[attr] (1 as T)",
99
"#[attr] (x = 1)",
100
"#[attr] (x += 1)",
101
+ // If the attribute were not present on the binary operation, it would be
102
+ // legal to render this without not just the inner parentheses, but also the
103
+ // outer ones. `return x + .. .field` (Yes, really.) Currently the
104
+ // pretty-printer does not take advantage of this edge case.
105
+ "(return #[attr] (x + ..)).field",
106
+ "(return x + ..).field",
107
// Grammar restriction: break value starting with a labeled loop is not
108
// allowed, except if the break is also labeled.
109
"break 'outer 'inner: loop {} + 2",
0 commit comments