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.
2 parents 0cbcb17 + 00f0b0c commit cef6894Copy full SHA for cef6894
2 files changed
src/librustc_ast_pretty/pprust.rs
@@ -1749,6 +1749,7 @@ impl<'a> State<'a> {
1749
Consistent,
1750
&fields[..],
1751
|s, field| {
1752
+ s.print_outer_attributes(&field.attrs);
1753
s.ibox(INDENT_UNIT);
1754
if !field.is_shorthand {
1755
s.print_ident(field.ident);
src/test/pretty/issue-68710-field-attr-proc-mac-lost.rs
@@ -0,0 +1,16 @@
1
+// pp-exact
2
+
3
+fn main() { }
4
5
+struct C {
6
+ field: u8,
7
+}
8
9
+#[allow()]
10
+const C: C =
11
+ C{
12
+ #[cfg(debug_assertions)]
13
+ field: 0,
14
15
+ #[cfg(not (debug_assertions))]
16
+ field: 1,};
0 commit comments