Skip to content

Commit 91fb8ee

Browse files
authored
Merge pull request #1036 from GilRtr/master
Missing TypeParamBounds in TypeAlias
2 parents 1452021 + 7820e7c commit 91fb8ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/items/type-aliases.md

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
> **<sup>Syntax</sup>**\
44
> _TypeAlias_ :\
55
> &nbsp;&nbsp; `type` [IDENTIFIER]&nbsp;[_GenericParams_]<sup>?</sup>
6+
> ( `:` [_TypeParamBounds_] )<sup>?</sup>
67
> [_WhereClause_]<sup>?</sup> ( `=` [_Type_] )<sup>?</sup> `;`
78
89
A _type alias_ defines a new name for an existing [type]. Type aliases are
@@ -33,8 +34,12 @@ let _ = TypeAlias(5); // Doesn't work
3334
A 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

0 commit comments

Comments
 (0)