From cd79c7189db7b611f9199fd12ba56563afa18642 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 13 Aug 2025 14:44:26 +0200 Subject: [PATCH] Correctly handle when there are no unstable items in the documented crate --- src/librustdoc/html/static/js/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 10e01b4e26274..0011544d16e2f 100644 --- a/src/librustdoc/html/static/js/search.js +++ b/src/librustdoc/html/static/js/search.js @@ -2060,7 +2060,9 @@ class DocSearch { // Deprecated and unstable items and items with no description this.searchIndexDeprecated.set(crate, new RoaringBitmap(crateCorpus.c)); this.searchIndexEmptyDesc.set(crate, new RoaringBitmap(crateCorpus.e)); - this.searchIndexUnstable.set(crate, new RoaringBitmap(crateCorpus.u)); + if (crateCorpus.u !== undefined && crateCorpus.u !== null) { + this.searchIndexUnstable.set(crate, new RoaringBitmap(crateCorpus.u)); + } let descIndex = 0; /**