We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38bd4cf commit 4b1e25cCopy full SHA for 4b1e25c
src/rustdoc-internals/search.md
@@ -521,4 +521,25 @@ const EXPECTED = [
521
returned: [],
522
},
523
]
524
-```
+```
525
+
526
+If the [`//@ revisions`] directive is used, the JS file will
527
+have access to a variable called `REVISION`.
528
529
+```js
530
+const EXPECTED = [
531
+ // This first test targets name-based search.
532
+ {
533
+ query: "constructor",
534
+ others: REVISION === "has_constructor" ?
535
+ [
536
+ { path: "constructor_search", name: "constructor" },
537
+ ] :
538
+ [],
539
+ in_args: [],
540
+ returned: [],
541
+ },
542
+];
543
544
545
+[`//@ revisions`]: ../tests/compiletest.md#revisions
0 commit comments