Skip to content

Commit a4ea4a1

Browse files
committed
Move Type<..> to type expressions in index
The syntax `Type<..>`, without turbofish, is only valid in a type expression. Let's move this to that table and document `Trait<..>` along with it.
1 parent e32a1a8 commit a4ea4a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/syntax-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ This appendix provides an index of tokens and common forms with links to where t
173173
| `Type::…`<br>`<Type as Trait>::ident` | [associated items] |
174174
| `<Type>::…` | [qualified paths] which can be used for types without names such as `<&T>::…`, `<[T]>::…`, etc. |
175175
| `Trait::method(…)`<br>`Type::method(…)`<br>`<Type as Trait>::method(…)` | [disambiguated method calls] |
176-
| `Type<…>` | [generic arguments] (e.g. `Vec<u8>`) <!-- TODO: fix after generic args reorg --> |
177176
| `method::<…>(…)`<br>`path::<…>` | [generic arguments], aka turbofish |
178177
| `()` | [unit] |
179178
| `(expr)` | [parenthesized expressions] |
@@ -240,6 +239,7 @@ This appendix provides an index of tokens and common forms with links to where t
240239
| `impl Trait` | [impl trait types], [anonymous type parameters] |
241240
| `dyn Trait` | [trait object types] |
242241
| `ident`<br>`ident::…` | [type paths] (can refer to structs, enums, unions, aliases, traits, generics, etc.) |
242+
| `Type<…>`<br>`Trait<…>` | [generic arguments] (e.g. `Vec<u8>`) |
243243
| `Trait<ident = Type>` | [associated type bindings] (e.g. `Iterator<Item = T>`) |
244244
| `Trait<ident: …>` | [associated type bounds] (e.g. `Iterator<Item: Send>`) |
245245
| `&Type`<br>`&mut Type` | [reference types] |

0 commit comments

Comments
 (0)