Skip to content

Commit db43481

Browse files
committed
Add a few more docs
1 parent 602bf00 commit db43481

File tree

1 file changed

+6
-0
lines changed
  • src/doc/rustdoc/src/read-documentation

1 file changed

+6
-0
lines changed

src/doc/rustdoc/src/read-documentation/search.md

+6
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ will match these queries:
147147
* `Read -> Result<Vec<u8>, Error>`
148148
* `Read -> Result<Error, Vec>`
149149
* `Read -> Result<Vec<u8>>`
150+
* `Read -> u8`
150151

151152
But it *does not* match `Result<Vec, u8>` or `Result<u8<Vec>>`.
152153

@@ -200,6 +201,11 @@ since parens act as the grouping operator. If they're empty, though, they will
200201
match both `unit` and `tuple`, and if there's more than one type (or a trailing
201202
or leading comma) it is the same as `primitive:tuple<...>`.
202203

204+
However, since items can be left out of the query, `(T)` will still return
205+
results for types that match tuples, even though it also matches the type on
206+
its own. That is, `(u32)` matches `(u32,)` for the exact same reason that it
207+
also matches `Result<u32, Error>`.
208+
203209
### Limitations and quirks of type-based search
204210

205211
Type-based search is still a buggy, experimental, work-in-progress feature.

0 commit comments

Comments
 (0)