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
@@ -153,7 +156,7 @@ ParamList =
153156
154157SelfParam =
155158 Attr* (
156- ('&' 'lifetime' ?)? 'mut'? 'self'
159+ ('&' Lifetime ?)? 'mut'? 'self'
157160 | 'mut'? 'self' ':' Type
158161 )
159162
@@ -281,13 +284,13 @@ ConstParam =
281284 ('=' default_val:Expr)?
282285
283286LifetimeParam =
284- Attr* 'lifetime' (':' TypeBoundList?)?
287+ Attr* Lifetime (':' TypeBoundList?)?
285288
286289WhereClause =
287290 'where' predicates:(WherePred (',' WherePred)* ','?)
288291
289292WherePred =
290- ('for' GenericParamList)? ('lifetime' | Type) ':' TypeBoundList
293+ ('for' GenericParamList)? (Lifetime | Type) ':' TypeBoundList
291294
292295Visibility =
293296 'pub' ('('
@@ -459,13 +462,13 @@ WhileExpr =
459462 loop_body:BlockExpr
460463
461464Label =
462- 'lifetime '
465+ Lifetime ': '
463466
464467BreakExpr =
465- Attr* 'break' 'lifetime' ? Expr?
468+ Attr* 'break' Lifetime ? Expr?
466469
467470ContinueExpr =
468- Attr* 'continue' 'lifetime' ?
471+ Attr* 'continue' Lifetime ?
469472
470473RangeExpr =
471474 Attr* start:Expr? op:('..' | '..=') end:Expr?
@@ -529,7 +532,7 @@ PtrType =
529532 '*' ('const' | 'mut') Type
530533
531534RefType =
532- '&' 'lifetime' ? 'mut'? Type
535+ '&' Lifetime ? 'mut'? Type
533536
534537ArrayType =
535538 '[' Type ';' Expr ']'
@@ -556,7 +559,7 @@ TypeBoundList =
556559 bounds:(TypeBound ('+' TypeBound)* '+'?)
557560
558561TypeBound =
559- 'lifetime'
562+ Lifetime
560563| '?'? Type
561564
562565//************************//
0 commit comments