Skip to content

Commit

Permalink
rustdoc: update comment in search.js for rust-lang#107629
Browse files Browse the repository at this point in the history
  • Loading branch information
pitaj committed Sep 3, 2023
1 parent 9f5fc1b commit b1e32ea
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/librustdoc/html/static/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2486,18 +2486,25 @@ ${item.displayPath}<span class="${type}">${name}</span>\
let crateSize = 0;

/**
* The raw search data for a given crate. `n`, `t`, `d`, and `q`, `i`, and `f`
* are arrays with the same length. n[i] contains the name of an item.
* t[i] contains the type of that item (as a string of characters that represent an
* offset in `itemTypes`). d[i] contains the description of that item.
* The raw search data for a given crate. `n`, `t`, `d`, `i`, and `f`
* are arrays with the same length. `q`, `a`, and `c` use a sparse
* representation for compactness.
*
* q[i] contains the full path of the item, or an empty string indicating
* "same as q[i-1]".
* `n[i]` contains the name of an item.
*
* i[i] contains an item's parent, usually a module. For compactness,
* `t[i]` contains the type of that item
* (as a string of characters that represent an offset in `itemTypes`).
*
* `d[i]` contains the description of that item.
*
* `q` contains the full paths of the items. For compactness, it is a set of
* (index, path) pairs used to create a map. If a given index `i` is
* not present, this indicates "same as the last index present".
*
* `i[i]` contains an item's parent, usually a module. For compactness,
* it is a set of indexes into the `p` array.
*
* f[i] contains function signatures, or `0` if the item isn't a function.
* `f[i]` contains function signatures, or `0` if the item isn't a function.
* Functions are themselves encoded as arrays. The first item is a list of
* types representing the function's inputs, and the second list item is a list
* of types representing the function's output. Tuples are flattened.
Expand All @@ -2511,6 +2518,8 @@ ${item.displayPath}<span class="${type}">${name}</span>\
*
* `p` is a list of path/type pairs. It is used for parents and function parameters.
*
* `c` is an array of item indices that are deprecated.
*
* @type {{
* doc: string,
* a: Object,
Expand Down

0 comments on commit b1e32ea

Please sign in to comment.