Skip to content

Commit

Permalink
Update how-to-read-rustdoc.md
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Apr 14, 2023
1 parent afee241 commit 6ce5327
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/doc/rustdoc/src/how-to-read-rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ce5327

Please sign in to comment.