@@ -149,12 +149,16 @@ will match these queries:
149
149
* ` &mut Read -> Result<Vec<u8>, Error> `
150
150
* ` Read -> Result<Vec<u8>, Error> `
151
151
* ` Read -> Result<Vec<u8>> `
152
- * ` Read -> u8 `
152
+ * ` Read -> Vec<u8> `
153
153
154
154
But it * does not* match ` Result<Vec, u8> ` or ` Result<u8<Vec>> ` ,
155
155
because those are nested incorrectly, and it does not match
156
156
` 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
158
162
159
163
To search for a function that accepts a function as a parameter,
160
164
like ` Iterator::all ` , wrap the nested signature in parenthesis,
@@ -165,6 +169,18 @@ but you need to know which one you want.
165
169
166
170
[ iterator-all ] : ../../std/vec/struct.Vec.html?search=Iterator<T>%2C+(T+->+bool)+->+bool&filter-crate=std
167
171
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
+
168
184
### Primitives with Special Syntax
169
185
170
186
| Shorthand | Explicit names |
@@ -234,11 +250,6 @@ Most of these limitations should be addressed in future version of Rustdoc.
234
250
that you don't want a type parameter, you can force it to match
235
251
something else by giving it a different prefix like ` struct:T ` .
236
252
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
-
242
253
* Searching for lifetimes is not supported.
243
254
244
255
* It's impossible to search based on the length of an array.
0 commit comments