We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ca1d926 + 3081712 commit c5ef18cCopy full SHA for c5ef18c
src/items/type-aliases.md
@@ -1,5 +1,10 @@
1
# Type aliases
2
3
+> **<sup>Syntax</sup>**
4
+> _TypeAlias_ :
5
+> `type` [IDENTIFIER] [_Generics_]<sup>?</sup>
6
+> [_WhereClause_]<sup>?</sup> `=` [_Type_] `;`
7
+
8
A _type alias_ defines a new name for an existing [type]. Type aliases are
9
declared with the keyword `type`. Every value has a single, specific type, but
10
may implement several different traits, or be compatible with several different
@@ -23,3 +28,8 @@ type F = E;
23
28
let _: F = E::A; // OK
24
29
// let _: F = F::A; // Doesn't work
25
30
```
31
32
+[IDENTIFIER]: identifiers.html
33
+[_Generics_]: items.html#type-parameters
34
+[_WhereClause_]: items.html#type-parameters
35
+[_Type_]: types.html
0 commit comments