about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-02 18:49:29 +0000
committerbors <bors@rust-lang.org>2023-07-02 18:49:29 +0000
commitbf0e22b298e282dec3589f70c67e401588d6c693 (patch)
treee9235bd74701ccb4b34cc30a87dd4c9058824688 /src/doc
parent32d81eccd64513bacef9dfa1574543ada6b45d85 (diff)
parente4ee3298656b74dd6be810862b5dd4cb8d2825b8 (diff)
downloadrust-bf0e22b298e282dec3589f70c67e401588d6c693.tar.gz
rust-bf0e22b298e282dec3589f70c67e401588d6c693.zip
Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle
rustdoc: Allow whitespace as path separator like double colon

Fixes https://github.com/rust-lang/rust/issues/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](https://github.com/rust-lang/rust/pull/108537#issuecomment-1589480564).

r? `@notriddle`
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustdoc/src/how-to-read-rustdoc.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/how-to-read-rustdoc.md b/src/doc/rustdoc/src/how-to-read-rustdoc.md
index 55cce8ab570..9deb7009cfe 100644
--- a/src/doc/rustdoc/src/how-to-read-rustdoc.md
+++ b/src/doc/rustdoc/src/how-to-read-rustdoc.md
@@ -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