about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-16 18:06:28 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-16 18:06:28 +0200
commit2eccf18075893f7ea2226f6d7d7df818606835cb (patch)
tree3d72c3dd682be2c2661eca3a696837567963dd94
parent6ca4639d6a0131097bb10e30b516abc2632cf32e (diff)
downloadrust-2eccf18075893f7ea2226f6d7d7df818606835cb.tar.gz
rust-2eccf18075893f7ea2226f6d7d7df818606835cb.zip
Add comment to prevent having code other than `initSearch` at the end of `search.js`
-rw-r--r--src/librustdoc/html/static/js/search.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index 126da46ab77..bc9d8a10296 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -5872,6 +5872,10 @@ Lev1TParametricDescription.prototype.offsetIncrs3 = /*2 bits per value */ new In
     0xa0fc0000,0x5555ba08,0x55555555,
 ]);
 
+// ====================
+// WARNING: Nothing should be added below this comment: we need the `initSearch` function to
+// be called ONLY when the whole file has been parsed and loaded.
+
 // @ts-expect-error
 function initSearch(searchIndx) {
     rawSearchIndex = searchIndx;