diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-08-13 18:43:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-13 18:43:03 +0200 |
| commit | 858927cc9dfa1287745e8dbee6d81f4f3bd8c8c5 (patch) | |
| tree | 92694aa8a6e4608827203445f5d88a681e673bfb | |
| parent | 6f0746da4effaceae569ae69d4ea05758f49dff7 (diff) | |
| parent | cd79c7189db7b611f9199fd12ba56563afa18642 (diff) | |
| download | rust-858927cc9dfa1287745e8dbee6d81f4f3bd8c8c5.tar.gz rust-858927cc9dfa1287745e8dbee6d81f4f3bd8c8c5.zip | |
Rollup merge of #145349 - GuillaumeGomez:unstable-items-search, r=lolbinarycat,fmease
Correctly handle when there are no unstable items in the documented crate Fixes rust-lang/rust#145287. cc ```@lolbinarycat```
| -rw-r--r-- | src/librustdoc/html/static/js/search.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js index 10e01b4e262..0011544d16e 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; /** |
