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