@@ -149,12 +149,16 @@ will match these queries:
149149* ` &mut Read -> Result<Vec<u8>, Error> `
150150* ` Read -> Result<Vec<u8>, Error> `
151151* ` Read -> Result<Vec<u8>> `
152- * ` Read -> u8 `
152+ * ` Read -> Vec<u8> `
153153
154154But it * does not* match ` Result<Vec, u8> ` or ` Result<u8<Vec>> ` ,
155155because those are nested incorrectly, and it does not match
156156` Result<Error, Vec<u8>> ` or ` Result<Error> ` , because those are
157- in the wrong order.
157+ in the wrong order. It also does not match ` Read -> u8 ` , because
158+ only [ certain generic wrapper types] can be left out, and ` Vec ` isn't
159+ one of them.
160+
161+ [ certain generic wrapper types ] : #wrappers-that-can-be-omitted
158162
159163To search for a function that accepts a function as a parameter,
160164like ` Iterator::all ` , wrap the nested signature in parenthesis,
@@ -165,6 +169,18 @@ but you need to know which one you want.
165169
166170[ iterator-all ] : ../../std/vec/struct.Vec.html?search=Iterator<T>%2C+(T+->+bool)+->+bool&filter-crate=std
167171
172+ ### Wrappers that can be omitted
173+
174+ * References
175+ * Box
176+ * Rc
177+ * Arc
178+ * Option
179+ * Result
180+ * From
181+ * Into
182+ * Future
183+
168184### Primitives with Special Syntax
169185
170186| Shorthand | Explicit names |
@@ -234,11 +250,6 @@ Most of these limitations should be addressed in future version of Rustdoc.
234250 that you don't want a type parameter, you can force it to match
235251 something else by giving it a different prefix like ` struct:T ` .
236252
237- * It's impossible to search for references or pointers. The
238- wrapped types can be searched for, so a function that takes ` &File ` can
239- be found with ` File ` , but you'll get a parse error when typing an ` & `
240- into the search field.
241-
242253 * Searching for lifetimes is not supported.
243254
244255 * It's impossible to search based on the length of an array.
0 commit comments