2626NameRef =
2727 'ident' | 'int_number'
2828
29+ Lifetime =
30+ 'lifetime_ident'
31+
2932Path =
3033 (qualifier:Path '::')? segment:PathSegment
3134
@@ -52,7 +55,7 @@ AssocTypeArg =
5255 NameRef (':' TypeBoundList | '=' Type)
5356
5457LifetimeArg =
55- 'lifetime'
58+ Lifetime
5659
5760ConstArg =
5861 Expr
@@ -147,7 +150,7 @@ ParamList =
147150
148151SelfParam =
149152 Attr* (
150- ('&' 'lifetime' ?)? 'mut'? 'self'
153+ ('&' Lifetime ?)? 'mut'? 'self'
151154 | 'mut'? 'self' ':' Type
152155 )
153156
@@ -275,13 +278,13 @@ ConstParam =
275278 ('=' default_val:Expr)?
276279
277280LifetimeParam =
278- Attr* 'lifetime' (':' TypeBoundList?)?
281+ Attr* Lifetime (':' TypeBoundList?)?
279282
280283WhereClause =
281284 'where' predicates:(WherePred (',' WherePred)* ','?)
282285
283286WherePred =
284- ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList
287+ ('for' GenericParamList)? (Lifetime | Type) ':' TypeBoundList
285288
286289Visibility =
287290 'pub' ('('
@@ -453,13 +456,13 @@ WhileExpr =
453456 loop_body:BlockExpr
454457
455458Label =
456- 'lifetime' ':'
459+ Lifetime ':'
457460
458461BreakExpr =
459- Attr* 'break' 'lifetime' ? Expr?
462+ Attr* 'break' Lifetime ? Expr?
460463
461464ContinueExpr =
462- Attr* 'continue' 'lifetime' ?
465+ Attr* 'continue' Lifetime ?
463466
464467RangeExpr =
465468 Attr* start:Expr? op:('..' | '..=') end:Expr?
@@ -523,7 +526,7 @@ PtrType =
523526 '*' ('const' | 'mut') Type
524527
525528RefType =
526- '&' 'lifetime' ? 'mut'? Type
529+ '&' Lifetime ? 'mut'? Type
527530
528531ArrayType =
529532 '[' Type ';' Expr ']'
@@ -550,7 +553,7 @@ TypeBoundList =
550553 bounds:(TypeBound ('+' TypeBound)* '+'?)
551554
552555TypeBound =
553- 'lifetime'
556+ Lifetime
554557| '?'? Type
555558
556559//************************//
0 commit comments