Skip to content

Commit

Permalink
Merge pull request #9 from dtolnay/innerattr
Browse files Browse the repository at this point in the history
Remove support for inner attributes on non-block expressions
  • Loading branch information
dtolnay committed Mar 16, 2022
2 parents 52c9465 + af7938b commit 768cae1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/expr.rs
Expand Up @@ -117,7 +117,6 @@ impl Printer {
self.word("[");
self.cbox(INDENT);
self.zerobreak();
self.inner_attrs(&expr.attrs);
for element in expr.elems.iter().delimited() {
self.expr(&element);
self.trailing_comma(element.is_last);
Expand Down Expand Up @@ -504,7 +503,6 @@ impl Printer {
fn expr_paren(&mut self, expr: &ExprParen) {
self.outer_attrs(&expr.attrs);
self.word("(");
self.inner_attrs(&expr.attrs);
self.expr(&expr.expr);
self.word(")");
}
Expand Down Expand Up @@ -540,7 +538,6 @@ impl Printer {
fn expr_repeat(&mut self, expr: &ExprRepeat) {
self.outer_attrs(&expr.attrs);
self.word("[");
self.inner_attrs(&expr.attrs);
self.expr(&expr.expr);
self.word("; ");
self.expr(&expr.len);
Expand All @@ -564,7 +561,6 @@ impl Printer {
self.end();
self.word(" {");
self.space_if_nonempty();
self.inner_attrs(&expr.attrs);
for field_value in expr.fields.iter().delimited() {
self.field_value(&field_value);
self.trailing_comma_or_space(field_value.is_last && expr.rest.is_none());
Expand Down Expand Up @@ -603,7 +599,6 @@ impl Printer {
self.word("(");
self.cbox(INDENT);
self.zerobreak();
self.inner_attrs(&expr.attrs);
for elem in expr.elems.iter().delimited() {
self.expr(&elem);
if expr.elems.len() == 1 {
Expand Down
1 change: 0 additions & 1 deletion src/item.rs
Expand Up @@ -64,7 +64,6 @@ impl Printer {
self.where_clause_for_body(&item.generics.where_clause);
self.word("{");
self.hardbreak_if_nonempty();
self.inner_attrs(&item.attrs);
for variant in &item.variants {
self.variant(variant);
self.word(",");
Expand Down
2 changes: 0 additions & 2 deletions src/pat.rs
Expand Up @@ -154,7 +154,6 @@ impl Printer {
self.word("(");
self.cbox(INDENT);
self.zerobreak();
self.inner_attrs(&pat.attrs);
for elem in pat.elems.iter().delimited() {
self.pat(&elem);
if pat.elems.len() == 1 {
Expand All @@ -177,7 +176,6 @@ impl Printer {
self.word("(");
self.cbox(INDENT);
self.zerobreak();
self.inner_attrs(&pat.attrs);
for elem in pat.pat.elems.iter().delimited() {
self.pat(&elem);
self.trailing_comma(elem.is_last);
Expand Down

0 comments on commit 768cae1

Please sign in to comment.