about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-06-24 17:47:24 -0500
committerbinarycat <binarycat@envs.net>2025-06-26 12:33:30 -0500
commitb2be01c81567e89142577f9474a810e3a8676cfc (patch)
treecfa0e4e13df30b5a470b19d0274d5c91131d841c /src
parent3129d37ef7075ee3cbaa3d6cbe1b5794f67192b0 (diff)
rustdoc: show attributes on enum variants
mostly for #[non_exhaustive]
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/render/print_item.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 515424cbef1..5456a09dce7 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -1702,6 +1702,7 @@ fn render_enum_fields(
                 if v.is_stripped() {
                     continue;
                 }
+                write!(w, "{}", render_attributes_in_pre(v, TAB, cx))?;
                 w.write_str(TAB)?;
                 match v.kind {
                     clean::VariantItem(ref var) => match var.kind {