Skip to content

Commit 8fec524

Browse files
committed
Fix grammar rules containing bounds
1 parent 581920f commit 8fec524

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/items/type-aliases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ r[items.type]
44
r[items.type.syntax]
55
```grammar,items
66
TypeAlias ->
7-
`type` IDENTIFIER GenericParams? ( `:` TypeParamBounds )?
7+
`type` IDENTIFIER GenericParams? ( `:` TypeParamBounds? )?
88
WhereClause?
99
( `=` Type WhereClause?)? `;`
1010
```

src/paths.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ GenericArgsBinding ->
6868
IDENTIFIER GenericArgs? `=` Type
6969
7070
GenericArgsBounds ->
71-
IDENTIFIER GenericArgs? `:` TypeParamBounds
71+
IDENTIFIER GenericArgs? `:` TypeParamBounds?
7272
```
7373

7474
r[paths.expr.intro]

src/types/impl-trait.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ r[type.impl-trait]
33

44
r[type.impl-trait.syntax]
55
```grammar,types
6-
ImplTraitType -> `impl` TypeParamBounds
6+
ImplTraitType -> `impl` TypeParamBounds?
77
8-
ImplTraitTypeOneBound -> `impl` TraitBound
8+
ImplTraitTypeOneBound -> `impl` TraitBound?
99
```
1010

1111
r[type.impl-trait.intro]

src/types/trait-object.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ r[type.trait-object]
33

44
r[type.trait-object.syntax]
55
```grammar,types
6-
TraitObjectType -> `dyn`? TypeParamBounds
6+
TraitObjectType -> TypeParamBounds | `dyn` TypeParamBounds?
77
8-
TraitObjectTypeOneBound -> `dyn`? TraitBound
8+
TraitObjectTypeOneBound -> TraitBound | `dyn` TraitBound?
99
```
1010

1111
r[type.trait-object.intro]

0 commit comments

Comments
 (0)