diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-11-16 21:05:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-16 21:05:45 +0100 |
| commit | eff2b7017dbea481295563f669c74edb018fe910 (patch) | |
| tree | 4d01ed553e6ffb8e77376c8efc867a18bab26c7c /tests/rustdoc-js-std | |
| parent | fb5bd7ffcc0563f9fed8a0a586e973f9c44124bf (diff) | |
| parent | cd46ff6c052421277a7a3548b4fe40be4973feb1 (diff) | |
| download | rust-eff2b7017dbea481295563f669c74edb018fe910.tar.gz rust-eff2b7017dbea481295563f669c74edb018fe910.zip | |
Rollup merge of #132569 - lolbinarycat:rustdoc-search-path-end-empty-v2, r=notriddle
rustdoc search: allow queries to end in an empty path segment fixes https://github.com/rust-lang/rust/issues/129707 this can be used to show all items in a module, or all associated items for a type. currently sufferes slightly due to case insensitivity, so `Option::` will also show items in the `option::` module. it disables the checking of the last path element, otherwise only items with short names will be shown r? `@notriddle`
Diffstat (limited to 'tests/rustdoc-js-std')
| -rw-r--r-- | tests/rustdoc-js-std/parser-errors.js | 8 | ||||
| -rw-r--r-- | tests/rustdoc-js-std/path-end-empty.js | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/rustdoc-js-std/parser-errors.js b/tests/rustdoc-js-std/parser-errors.js index 068298e7236..8bffef61c8f 100644 --- a/tests/rustdoc-js-std/parser-errors.js +++ b/tests/rustdoc-js-std/parser-errors.js @@ -144,14 +144,6 @@ const PARSED = [ error: "Unexpected `:: ::`", }, { - query: "a::b::", - elems: [], - foundElems: 0, - userQuery: "a::b::", - returned: [], - error: "Paths cannot end with `::`", - }, - { query: ":a", elems: [], foundElems: 0, diff --git a/tests/rustdoc-js-std/path-end-empty.js b/tests/rustdoc-js-std/path-end-empty.js new file mode 100644 index 00000000000..6e853c61b4d --- /dev/null +++ b/tests/rustdoc-js-std/path-end-empty.js @@ -0,0 +1,6 @@ +const EXPECTED = { + 'query': 'Option::', + 'others': [ + { 'path': 'std::option::Option', 'name': 'get_or_insert_default' }, + ], +} |
