Skip to content

Commit def41e9

Browse files
committed
Fix grammar rules containing lifetime bounds
`struct T<'a:> where 'a:;` is syntactically valid.
1 parent f68a527 commit def41e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/items/generics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GenericParams -> `<` ( GenericParam (`,` GenericParam)* `,`? )? `>`
77
88
GenericParam -> OuterAttribute* ( LifetimeParam | TypeParam | ConstParam )
99
10-
LifetimeParam -> Lifetime ( `:` LifetimeBounds )?
10+
LifetimeParam -> Lifetime ( `:` LifetimeBounds? )?
1111
1212
TypeParam -> IDENTIFIER ( `:` Bounds? )? ( `=` Type )?
1313
@@ -234,7 +234,7 @@ WhereClauseItem ->
234234
LifetimeWhereClauseItem
235235
| TypeBoundWhereClauseItem
236236
237-
LifetimeWhereClauseItem -> Lifetime `:` LifetimeBounds
237+
LifetimeWhereClauseItem -> Lifetime `:` LifetimeBounds?
238238
239239
TypeBoundWhereClauseItem -> ForLifetimes? Type `:` Bounds?
240240
```

0 commit comments

Comments
 (0)