File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 3
3
> ** <sup >Syntax</sup >** \
4
4
> _ TypeAlias_ :\
5
5
>   ;  ; ` type ` [ IDENTIFIER]   ; [ _ GenericParams_ ] <sup >?</sup >
6
+ > ( ` : ` [ _ TypeParamBounds_ ] )<sup >?</sup >
6
7
> [ _ WhereClause_ ] <sup >?</sup > ( ` = ` [ _ Type_ ] )<sup >?</sup > ` ; `
7
8
8
9
A _ type alias_ defines a new name for an existing [ type] . Type aliases are
@@ -33,8 +34,12 @@ let _ = TypeAlias(5); // Doesn't work
33
34
A type alias without the [ _ Type_ ] specification may only appear as an
34
35
[ associated type] in a [ trait] .
35
36
37
+ A type alias with [ _ TypeParamBounds_ ] may only specified when used as
38
+ an [ associated type] in a [ trait] .
39
+
36
40
[ IDENTIFIER ] : ../identifiers.md
37
41
[ _GenericParams_ ] : generics.md
42
+ [ _TypeParamBounds_ ] : ../trait-bounds.md
38
43
[ _WhereClause_ ] : generics.md#where-clauses
39
44
[ _Type_ ] : ../types.md#type-expressions
40
45
[ associated type ] : associated-items.md#associated-types
You can’t perform that action at this time.
0 commit comments