diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-08-14 13:06:05 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-08-14 13:06:05 +0200 |
| commit | a195cf63b88ecfccebeae59e150a65ec5732779b (patch) | |
| tree | d93fc395ede7f1c50a46bf8205686bfb6c2ea54d /src/librustdoc/html/render | |
| parent | 2820fcc8302d25acdefbcfd4351831441dc177c6 (diff) | |
| download | rust-a195cf63b88ecfccebeae59e150a65ec5732779b.tar.gz rust-a195cf63b88ecfccebeae59e150a65ec5732779b.zip | |
Revert "rustdoc search: prefer stable items in search results"
This reverts commit 1140e90074b0cbcfdea8535e4b51877e2838227e.
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 6 | ||||
| -rw-r--r-- | src/librustdoc/html/render/search_index.rs | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 41ebaeade1d..a46253237db 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -139,12 +139,6 @@ pub(crate) struct IndexItem { pub(crate) search_type: Option<IndexItemFunctionType>, pub(crate) aliases: Box<[Symbol]>, pub(crate) deprecation: Option<Deprecation>, - pub(crate) stability: Option<Stability>, -} -impl IndexItem { - fn is_unstable(&self) -> bool { - matches!(&self.stability, Some(Stability { level: StabilityLevel::Unstable { .. }, .. })) - } } /// A type used for the search index. diff --git a/src/librustdoc/html/render/search_index.rs b/src/librustdoc/html/render/search_index.rs index 8d510a393df..e2f86b8a854 100644 --- a/src/librustdoc/html/render/search_index.rs +++ b/src/librustdoc/html/render/search_index.rs @@ -93,7 +93,6 @@ pub(crate) fn build_index( ), aliases: item.attrs.get_doc_aliases(), deprecation: item.deprecation(tcx), - stability: item.stability(tcx), }); } } @@ -656,7 +655,6 @@ pub(crate) fn build_index( let mut parents_backref_queue = VecDeque::new(); let mut functions = String::with_capacity(self.items.len()); let mut deprecated = Vec::with_capacity(self.items.len()); - let mut unstable = Vec::with_capacity(self.items.len()); let mut type_backref_queue = VecDeque::new(); @@ -713,9 +711,6 @@ pub(crate) fn build_index( // bitmasks always use 1-indexing for items, with 0 as the crate itself deprecated.push(u32::try_from(index + 1).unwrap()); } - if item.is_unstable() { - unstable.push(u32::try_from(index + 1).unwrap()); - } } for (index, path) in &revert_extra_paths { @@ -754,7 +749,6 @@ pub(crate) fn build_index( crate_data.serialize_field("r", &re_exports)?; crate_data.serialize_field("b", &self.associated_item_disambiguators)?; crate_data.serialize_field("c", &bitmap_to_string(&deprecated))?; - crate_data.serialize_field("u", &bitmap_to_string(&unstable))?; crate_data.serialize_field("e", &bitmap_to_string(&self.empty_desc))?; crate_data.serialize_field("P", ¶m_names)?; if has_aliases { |
