about summary refs log tree commit diff
path: root/src/librustdoc/html/render
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-09 15:40:56 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-25 15:05:56 +0200
commit5f857a9871240efe6e15ca94dd03e06b90c6413d (patch)
treed1249cd0fcddf6543d5275fb9fc7615104261f63 /src/librustdoc/html/render
parentaa57e46e24a4a08cc336325e92567b40b0c2ba62 (diff)
Rename `clean::Enum::variants` method into `non_stripped_variants`
Diffstat (limited to 'src/librustdoc/html/render')
-rw-r--r--src/librustdoc/html/render/print_item.rs2
-rw-r--r--src/librustdoc/html/render/sidebar.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 39a631b637b..552e67c9f53 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -1535,7 +1535,7 @@ fn print_tuple_struct_fields(cx: &Context<'_>, s: &[clean::Item]) -> impl Displa
 
 fn item_enum(cx: &Context<'_>, it: &clean::Item, e: &clean::Enum) -> impl fmt::Display {
     fmt::from_fn(|w| {
-        let count_variants = e.variants().count();
+        let count_variants = e.non_stripped_variants().count();
         wrap_item(w, |w| {
             render_attributes_in_code(w, it, cx);
             write!(
diff --git a/src/librustdoc/html/render/sidebar.rs b/src/librustdoc/html/render/sidebar.rs
index 361966325fb..91540e06e33 100644
--- a/src/librustdoc/html/render/sidebar.rs
+++ b/src/librustdoc/html/render/sidebar.rs
@@ -599,7 +599,7 @@ fn sidebar_enum<'a>(
     deref_id_map: &'a DefIdMap<String>,
 ) {
     let mut variants = e
-        .variants()
+        .non_stripped_variants()
         .filter_map(|v| v.name)
         .map(|name| Link::new(format!("variant.{name}"), name.to_string()))
         .collect::<Vec<_>>();