Skip to content

Commit 85fca6d

Browse files
committed
Fix wrong comment
1 parent bd36c4f commit 85fca6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustdoc/clean/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,7 @@ impl Clean<Item> for hir::StructField<'_> {
17301730
StructFieldItem(self.ty.clean(cx)),
17311731
cx,
17321732
);
1733+
// Don't show `pub` for fields on enum variants; they are always public
17331734
Item { visibility: self.vis.clean(cx), ..what_rustc_thinks }
17341735
}
17351736
}
@@ -1742,6 +1743,7 @@ impl Clean<Item> for ty::FieldDef {
17421743
StructFieldItem(cx.tcx.type_of(self.did).clean(cx)),
17431744
cx,
17441745
);
1746+
// Don't show `pub` for fields on enum variants; they are always public
17451747
Item { visibility: self.vis.clean(cx), ..what_rustc_thinks }
17461748
}
17471749
}
@@ -2298,7 +2300,7 @@ impl Clean<Item> for doctree::Macro<'_> {
22982300
}),
22992301
cx,
23002302
);
2301-
// need to override attrs explicitly in case this was inlined
2303+
// rustc_metadata strips attributes on macros; use the attributes from the HIR instead
23022304
Item { attrs: self.attrs.clean(cx), ..what_rustc_thinks }
23032305
}
23042306
}

0 commit comments

Comments
 (0)