Skip to content

Commit b1e32ea

Browse files
committed
rustdoc: update comment in search.js for rust-lang#107629
1 parent 9f5fc1b commit b1e32ea

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

src/librustdoc/html/static/js/search.js

+17-8
Original file line numberDiff line numberDiff line change
@@ -2486,18 +2486,25 @@ ${item.displayPath}<span class="${type}">${name}</span>\
24862486
let crateSize = 0;
24872487

24882488
/**
2489-
* The raw search data for a given crate. `n`, `t`, `d`, and `q`, `i`, and `f`
2490-
* are arrays with the same length. n[i] contains the name of an item.
2491-
* t[i] contains the type of that item (as a string of characters that represent an
2492-
* offset in `itemTypes`). d[i] contains the description of that item.
2489+
* The raw search data for a given crate. `n`, `t`, `d`, `i`, and `f`
2490+
* are arrays with the same length. `q`, `a`, and `c` use a sparse
2491+
* representation for compactness.
24932492
*
2494-
* q[i] contains the full path of the item, or an empty string indicating
2495-
* "same as q[i-1]".
2493+
* `n[i]` contains the name of an item.
24962494
*
2497-
* i[i] contains an item's parent, usually a module. For compactness,
2495+
* `t[i]` contains the type of that item
2496+
* (as a string of characters that represent an offset in `itemTypes`).
2497+
*
2498+
* `d[i]` contains the description of that item.
2499+
*
2500+
* `q` contains the full paths of the items. For compactness, it is a set of
2501+
* (index, path) pairs used to create a map. If a given index `i` is
2502+
* not present, this indicates "same as the last index present".
2503+
*
2504+
* `i[i]` contains an item's parent, usually a module. For compactness,
24982505
* it is a set of indexes into the `p` array.
24992506
*
2500-
* f[i] contains function signatures, or `0` if the item isn't a function.
2507+
* `f[i]` contains function signatures, or `0` if the item isn't a function.
25012508
* Functions are themselves encoded as arrays. The first item is a list of
25022509
* types representing the function's inputs, and the second list item is a list
25032510
* of types representing the function's output. Tuples are flattened.
@@ -2511,6 +2518,8 @@ ${item.displayPath}<span class="${type}">${name}</span>\
25112518
*
25122519
* `p` is a list of path/type pairs. It is used for parents and function parameters.
25132520
*
2521+
* `c` is an array of item indices that are deprecated.
2522+
*
25142523
* @type {{
25152524
* doc: string,
25162525
* a: Object,

0 commit comments

Comments
 (0)