Skip to content

Commit b7c3561

Browse files
notriddlecompiler-errors
authored andcommitted
Minor wording improvements
1 parent af1c98d commit b7c3561

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/rustdoc-internals/search.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,17 @@ The `rustdoc-js-std` tests are the same, but don't require an `.rs`
369369
file, since they use the standard library.
370370

371371
The `.js` file is like a module (except the loader takes care of
372-
`exports` for you). It expects you to set these variables in the
373-
module's scope:
372+
`exports` for you). It uses these variables:
374373

375374
| Name | Type | Description
376375
| -------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------
377376
| `FILTER_CRATE` | `string` | Only include results from the given crate. In the GUI, this is the "Results in <kbd>crate</kbd>" drop-down menu.
378377
| `EXPECTED` | `[ResultsTable]\|ResultsTable` | List of tests to run, specifying what the hypothetical user types into the search box and sees in the tabs
379378
| `PARSED` | `[ParsedQuery]\|ParsedQuery` | List of parser tests to run, without running an actual search
380379

380+
`FILTER_CRATE` can be left out (equivalent to searching "all crates"), but you
381+
have to specify `EXPECTED` or `PARSED`.
382+
381383
Additionally, the following magic comments are supported.
382384
Put them on their own line, without indenting.
383385

@@ -390,12 +392,9 @@ Put them on their own line, without indenting.
390392
to minor scoring changes.
391393
* `// should-fail`: Used to write negative tests.
392394

393-
Standard library tests probably shouldn't specify any of these (we want the
394-
libs team to be able to add new stuff without causing our tests to fail), but
395-
standalone tests will often want `// exact-check`.
396-
397-
`FILTER_CRATE` can be left out (equivalent to searching "all crates"), but you
398-
have to specify `EXPECTED` or `PARSED`.
395+
Standard library tests usually shouldn't specify `// exact-check`, since we
396+
want the libs team to be able to add new items without causing unrelated
397+
tests to fail, but standalone tests will use it more often.
399398

400399
The `ResultsTable` and `ParsedQuery` types are specified in
401400
[`externs.js`](https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/js/externs.js).

0 commit comments

Comments
 (0)