diff options
| author | Michael Howell <michael@notriddle.com> | 2023-03-31 09:31:44 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2023-04-14 14:55:45 -0700 |
| commit | 6ce53278e191f8047addc7f44b98e180bc80d66d (patch) | |
| tree | fe25526e8a9149ed6bda06e66fdbd3591aed8e5a | |
| parent | afee2411e3fd5c6e8b3301fa748a760e01615904 (diff) | |
| download | rust-6ce53278e191f8047addc7f44b98e180bc80d66d.tar.gz rust-6ce53278e191f8047addc7f44b98e180bc80d66d.zip | |
Update how-to-read-rustdoc.md
| -rw-r--r-- | src/doc/rustdoc/src/how-to-read-rustdoc.md | 11 |
1 files changed, 11 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 2957916d56c..56342f65d99 100644 --- a/src/doc/rustdoc/src/how-to-read-rustdoc.md +++ b/src/doc/rustdoc/src/how-to-read-rustdoc.md @@ -94,6 +94,17 @@ can be matched with the following queries: * `trait:Iterator<primitive:u32> -> primitive:usize` * `Iterator -> usize` +Generics and function parameters are order-agnostic, but sensitive to nesting +and number of matches. For example, a function with the signature +`fn read_all(&mut self: impl Read) -> Result<Vec<u8>, Error>` +will match these queries: + +* `Read -> Result<Vec<u8>, Error>` +* `Read -> Result<Error, Vec>` +* `Read -> Result<Vec<u8>>` + +But it *does not* match `Result<Vec, u8>` or `Result<u8<Vec>>`. + ### Changing displayed theme You can change the displayed theme by opening the settings menu (the gear |
