Skip to content

Commit 3fa62ea

Browse files
committed
Fix pretty printing tuple struct element attributes
This backports rust-lang/rust#34310, which has not yet landed in a nightly yet, so we can't yet sync with the upstream libsyntax.
1 parent 50acfd9 commit 3fa62ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

syntex_syntax/src/print/pprust.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,8 +1403,9 @@ impl<'a> State<'a> {
14031403
try!(self.commasep(
14041404
Inconsistent, struct_def.fields(),
14051405
|s, field| {
1406-
try!(s.print_visibility(&field.vis));
14071406
try!(s.maybe_print_comment(field.span.lo));
1407+
try!(s.print_outer_attributes(&field.attrs));
1408+
try!(s.print_visibility(&field.vis));
14081409
s.print_type(&field.ty)
14091410
}
14101411
));

0 commit comments

Comments
 (0)