about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEzra Shaw <ezrasure@outlook.com>2023-03-11 21:22:42 +1300
committerEzra Shaw <ezrasure@outlook.com>2023-03-26 18:05:42 +1300
commite0ec9c0b9c08677b967fb2f50978bcb4466152cd (patch)
treed1af1ba0272ea9414b5f814d3289ea2784c434c0 /src
parent0c61c7a978fe9f7b77a1d667c77d2202dadd1c10 (diff)
downloadrust-e0ec9c0b9c08677b967fb2f50978bcb4466152cd.tar.gz
rust-e0ec9c0b9c08677b967fb2f50978bcb4466152cd.zip
rustdoc: tweak `some variants omitted`
Don't display `// some variants omitted` if enum is marked
`#[non_exhaustive]`
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/render/print_item.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 579b5a9c723..674cd0d62d4 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -1234,7 +1234,7 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
                 w.write_str(",\n");
             }
 
-            if variants_stripped {
+            if variants_stripped && !it.is_non_exhaustive() {
                 w.write_str("    // some variants omitted\n");
             }
             if toggle {