]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/static/js/externs.js
Rollup merge of #98479 - leocth:atomic-bool-fetch-not, r=joshtriplett
[rust.git] / src / librustdoc / html / static / js / externs.js
index 23947d002ab8d854a67eb89e4c655ba97806b86a..ecbe15a59da3c6ff518d110d58f76dabad8f4d12 100644 (file)
@@ -86,6 +86,9 @@ let Results;
  * A pair of [inputs, outputs], or 0 for null. This is stored in the search index.
  * The JavaScript deserializes this into FunctionSearchType.
  *
+ * Numeric IDs are *ONE-indexed* into the paths array (`p`). Zero is used as a sentinel for `null`
+ * because `null` is four bytes while `0` is one byte.
+ *
  * An input or output can be encoded as just a number if there is only one of them, AND
  * it has no generics. The no generics rule exists to avoid ambiguity: imagine if you had
  * a function with a single output, and that output had a single generic:
@@ -114,6 +117,9 @@ let RawFunctionSearchType;
  * A single function input or output type. This is either a single path ID, or a pair of
  * [path ID, generics].
  *
+ * Numeric IDs are *ONE-indexed* into the paths array (`p`). Zero is used as a sentinel for `null`
+ * because `null` is four bytes while `0` is one byte.
+ *
  * @typedef {number | [number, Array<RawFunctionType>]}
  */
 let RawFunctionType;