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