about summary refs log tree commit diff
path: root/src/librustdoc/html/render/mod.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-08-09 13:58:42 +1000
committerGitHub <noreply@github.com>2025-08-09 13:58:42 +1000
commit48f5929604d04484f6e6d2f047e81ee5df127633 (patch)
tree78d4ca95da692c211090fc0621d11f9b283ae0db /src/librustdoc/html/render/mod.rs
parent4c7749e8c8e50ad146da599eea3a250160c1bc2b (diff)
parentfdbc8d08a63a3d34b7aebabb2f18a768462a98c4 (diff)
downloadrust-48f5929604d04484f6e6d2f047e81ee5df127633.tar.gz
rust-48f5929604d04484f6e6d2f047e81ee5df127633.zip
Rollup merge of #141658 - lolbinarycat:rustdoc-search-stability-rank-138067, r=GuillaumeGomez
rustdoc search: prefer stable items in search results

fixes https://github.com/rust-lang/rust/issues/138067

this does add a new field to the search index, but since we're only listing unstable items instead of adding a boolean flag to every item, it should only increase the search index size of sysroot crates, since those are the only ones using the `staged_api` feature, at least as far as the rust project is concerned.
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
-rw-r--r--src/librustdoc/html/render/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index a46253237db..95259847075 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -139,6 +139,7 @@ pub(crate) struct IndexItem {
     pub(crate) search_type: Option<IndexItemFunctionType>,
     pub(crate) aliases: Box<[Symbol]>,
     pub(crate) deprecation: Option<Deprecation>,
+    pub(crate) is_unstable: bool,
 }
 
 /// A type used for the search index.