mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Fix display of attributes for enums
This commit is contained in:
parent
61b6f65884
commit
89b0956a9a
@ -1245,13 +1245,13 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
|
||||
let tcx = cx.tcx();
|
||||
let count_variants = e.variants().count();
|
||||
wrap_item(w, |mut w| {
|
||||
render_attributes_in_code(w, it, tcx);
|
||||
write!(
|
||||
w,
|
||||
"{attrs}{}enum {}{}",
|
||||
"{}enum {}{}",
|
||||
visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
|
||||
it.name.unwrap(),
|
||||
e.generics.print(cx),
|
||||
attrs = render_attributes_in_pre(it, "", tcx),
|
||||
);
|
||||
if !print_where_clause_and_check(w, &e.generics, cx) {
|
||||
// If there wasn't a `where` clause, we add a whitespace.
|
||||
|
Loading…
Reference in New Issue
Block a user