From: Daniel Keep Date: Fri, 9 Oct 2015 11:19:56 +0000 (+1100) Subject: Expanded entries for generics. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b78614fdfaf9e712f9ab93ea8389a6b7114d69e9;p=rust.git Expanded entries for generics. * Now mentions method generics. * Has separate entries for generic `fn`, `struct`, `enum`, and `impl` items. (Thanks killercup). --- diff --git a/src/doc/trpl/syntax-index.md b/src/doc/trpl/syntax-index.md index 099a5764351..7bbea8314f2 100644 --- a/src/doc/trpl/syntax-index.md +++ b/src/doc/trpl/syntax-index.md @@ -116,9 +116,12 @@ -* `path<…>`: specifies parameters to generic type *in a type*. See [Generics]. -* `path::<…>`: specifies parameters to generic type or function *in an expression*. -* `ident<…>`: generic parameters. See [Generics]. +* `path<…>` (*e.g.* `Vec`): specifies parameters to generic type *in a type*. See [Generics]. +* `path::<…>`, `method::<…>` (*e.g.* `"42".parse::()`): specifies parameters to generic type, function, or method *in an expression*. +* `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. * `type` (*e.g.* `Iterator`): a generic type where one or more associated types have specific assignments. See [Associated Types].