Skip to content

Commit

Permalink
Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-s…
Browse files Browse the repository at this point in the history
…eparator, r=notriddle

rustdoc: Allow whitespace as path separator like double colon

Fixes #108447.

I think it makes sense since it allows more common cases, however it also makes the syntax heavier. Not sure what the rest of the team thinks about it. In any case we'll need to go through FCP.

Full explanation for the changes is available [here](#108537 (comment)).

r? `@notriddle`
  • Loading branch information
bors committed Jul 2, 2023
2 parents 32d81ec + e4ee329 commit bf0e22b
Show file tree
Hide file tree
Showing 11 changed files with 431 additions and 188 deletions.
5 changes: 5 additions & 0 deletions src/doc/rustdoc/src/how-to-read-rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ Function signature searches also support arrays and slices. The explicit name
or array of bytes, while square brackets `[u8]` will match either one. Empty
square brackets, `[]`, will match any slice regardless of what it contains.

Paths are supported as well, you can look for `Vec::new` or `Option::Some` or
even `module::module_child::another_child::struct::field`. Whitespace characters
are considered the same as `::`, so if you write `Vec new`, it will be
considered the same as `Vec::new`.

### Shortcuts

Pressing `S` while focused elsewhere on the page will move focus to the
Expand Down
Loading

0 comments on commit bf0e22b

Please sign in to comment.