Skip to content

Commit bf0e22b

Browse files
committed
Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, 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`
2 parents 32d81ec + e4ee329 commit bf0e22b

11 files changed

+431
-188
lines changed

src/doc/rustdoc/src/how-to-read-rustdoc.md

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ Function signature searches also support arrays and slices. The explicit name
110110
or array of bytes, while square brackets `[u8]` will match either one. Empty
111111
square brackets, `[]`, will match any slice regardless of what it contains.
112112

113+
Paths are supported as well, you can look for `Vec::new` or `Option::Some` or
114+
even `module::module_child::another_child::struct::field`. Whitespace characters
115+
are considered the same as `::`, so if you write `Vec new`, it will be
116+
considered the same as `Vec::new`.
117+
113118
### Shortcuts
114119

115120
Pressing `S` while focused elsewhere on the page will move focus to the

0 commit comments

Comments
 (0)