Merge pull request #1481 from compiler-errors/atb

add grammar for `associated_type_bounds` in reference
This commit is contained in:
Eric Huss 2024-03-20 15:52:40 +00:00 committed by GitHub
commit b6779f40a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,7 @@ mod m {
> &nbsp;&nbsp; | `<` ( _GenericArg_ `,` )<sup>\*</sup> _GenericArg_ `,`<sup>?</sup> `>` > &nbsp;&nbsp; | `<` ( _GenericArg_ `,` )<sup>\*</sup> _GenericArg_ `,`<sup>?</sup> `>`
> >
> _GenericArg_ :\ > _GenericArg_ :\
> &nbsp;&nbsp; [_Lifetime_] | [_Type_] | _GenericArgsConst_ | _GenericArgsBinding_ > &nbsp;&nbsp; [_Lifetime_] | [_Type_] | _GenericArgsConst_ | _GenericArgsBinding_ | _GenericArgsBounds_
> >
> _GenericArgsConst_ :\ > _GenericArgsConst_ :\
> &nbsp;&nbsp; &nbsp;&nbsp; [_BlockExpression_]\ > &nbsp;&nbsp; &nbsp;&nbsp; [_BlockExpression_]\
@ -62,7 +62,10 @@ mod m {
> &nbsp;&nbsp; | [_SimplePathSegment_] > &nbsp;&nbsp; | [_SimplePathSegment_]
> >
> _GenericArgsBinding_ :\ > _GenericArgsBinding_ :\
> &nbsp;&nbsp; [IDENTIFIER] `=` [_Type_] > &nbsp;&nbsp; [IDENTIFIER] _GenericArgs_<sup>?</sup> `=` [_Type_]
>
> _GenericArgsBounds_ :\
> &nbsp;&nbsp; [IDENTIFIER] _GenericArgs_<sup>?</sup> `:` [_TypeParamBounds_]
Paths in expressions allow for paths with generic arguments to be specified. They are Paths in expressions allow for paths with generic arguments to be specified. They are
used in various places in [expressions] and [patterns]. used in various places in [expressions] and [patterns].
@ -396,6 +399,7 @@ mod without { // crate::without
[_SimplePathSegment_]: #simple-paths [_SimplePathSegment_]: #simple-paths
[_Type_]: types.md#type-expressions [_Type_]: types.md#type-expressions
[_TypeNoBounds_]: types.md#type-expressions [_TypeNoBounds_]: types.md#type-expressions
[_TypeParamBounds_]: trait-bounds.md
[literal]: expressions/literal-expr.md [literal]: expressions/literal-expr.md
[item]: items.md [item]: items.md
[variable]: variables.md [variable]: variables.md