about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-23 00:28:52 +0100
committerGitHub <noreply@github.com>2021-12-23 00:28:52 +0100
commit9f68b6e01e9c025e31634176e391a34be6095131 (patch)
tree719224996bd12075d638a0ad52652cf9c0b6c8d9 /library/std/src
parentd8bf974df56618f75ecd38d7e61fe0d720a9c8c4 (diff)
parent7ba086c6db1617b17bce2de13eaa34acc366226b (diff)
downloadrust-9f68b6e01e9c025e31634176e391a34be6095131.tar.gz
rust-9f68b6e01e9c025e31634176e391a34be6095131.zip
Rollup merge of #92026 - jsha:jsdoc-search, r=GuillaumeGomez
Add some JSDoc comments to rustdoc JS

This follows the Closure Compiler dialect of JSDoc, so we can use it to do some basic type checking. We don't plan to compile with Closure Compiler, just use it to check types. See https://github.com/google/closure-compiler/wiki/ for details.

To try checking the annotations, run:

```
npm i -g google-closure-compiler
google-closure-compiler -W VERBOSE build/x86_64-unknown-linux-gnu/doc/{search-index1.59.0.js,crates1.59.0.js} src/librustdoc/html/static/js/{search.js,main.js,storage.js} --externs src/librustdoc/html/static/js/externs.js >/dev/null
```

You'll see some warnings that "String continuations are not recommended". I'm not addressing those right now.

[Discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/doc.20format.20for.20JS/near/265209466).

r? `@GuillaumeGomez`
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions