Expanded entries for generics.
* Now mentions method generics. * Has separate entries for generic `fn`, `struct`, `enum`, and `impl` items. (Thanks killercup).
This commit is contained in:
parent
702b6e552c
commit
b78614fdfa
1 changed files with 6 additions and 3 deletions
|
@ -116,9 +116,12 @@
|
||||||
|
|
||||||
<!-- Generics -->
|
<!-- Generics -->
|
||||||
|
|
||||||
* `path<…>`: specifies parameters to generic type *in a type*. See [Generics].
|
* `path<…>` (*e.g.* `Vec<u8>`): specifies parameters to generic type *in a type*. See [Generics].
|
||||||
* `path::<…>`: specifies parameters to generic type or function *in an expression*.
|
* `path::<…>`, `method::<…>` (*e.g.* `"42".parse::<i32>()`): specifies parameters to generic type, function, or method *in an expression*.
|
||||||
* `ident<…>`: generic parameters. See [Generics].
|
* `fn ident<…> …`: define generic function. See [Generics].
|
||||||
|
* `struct ident<…> …`: define generic structure. See [Generics].
|
||||||
|
* `enum ident<…> …`: define generic enumeration. See [Generics].
|
||||||
|
* `impl<…> …`: define generic implementation.
|
||||||
* `for<…> type`: higher-ranked lifetime bounds.
|
* `for<…> type`: higher-ranked lifetime bounds.
|
||||||
* `type<ident=type>` (*e.g.* `Iterator<Item=T>`): a generic type where one or more associated types have specific assignments. See [Associated Types].
|
* `type<ident=type>` (*e.g.* `Iterator<Item=T>`): a generic type where one or more associated types have specific assignments. See [Associated Types].
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue