Skip to content

Commit 89b0956

Browse files
Fix display of attributes for enums
1 parent 61b6f65 commit 89b0956

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/render/print_item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1245,13 +1245,13 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
12451245
let tcx = cx.tcx();
12461246
let count_variants = e.variants().count();
12471247
wrap_item(w, |mut w| {
1248+
render_attributes_in_code(w, it, tcx);
12481249
write!(
12491250
w,
1250-
"{attrs}{}enum {}{}",
1251+
"{}enum {}{}",
12511252
visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
12521253
it.name.unwrap(),
12531254
e.generics.print(cx),
1254-
attrs = render_attributes_in_pre(it, "", tcx),
12551255
);
12561256
if !print_where_clause_and_check(w, &e.generics, cx) {
12571257
// If there wasn't a `where` clause, we add a whitespace.

0 commit comments

Comments
 (0)