File tree 3 files changed +5
-7
lines changed
3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ r[items.generics.syntax]
12
12
>   ;  ; [ _ OuterAttribute_ ] <sup >\* </sup > ( _ LifetimeParam_ | _ TypeParam_ | _ ConstParam_ )
13
13
>
14
14
> _ LifetimeParam_ :\
15
- >   ;  ; [ LIFETIME_OR_LABEL ]   ; ( ` : ` [ _ LifetimeBounds_ ] )<sup >?</sup >
15
+ >   ;  ; [ _ Lifetime _ ]   ; ( ` : ` [ _ LifetimeBounds_ ] )<sup >?</sup >
16
16
>
17
17
> _ TypeParam_ :\
18
18
>   ;  ; [ IDENTIFIER]   ; ( ` : ` [ _ TypeParamBounds_ ] <sup >?</sup > )<sup >?</sup > ( ` = ` [ _ Type_ ] )<sup >?</sup >
@@ -54,8 +54,8 @@ r[items.generics.builtin-generic-types]
54
54
[ function pointers] have lifetime or type parameters as well, but are not
55
55
referred to with path syntax.
56
56
57
- r[ items.generics.wildcard-lifetime ]
58
- ` '_ ` is not a valid lifetime parameter .
57
+ r[ items.generics.invalid-lifetimes ]
58
+ ` '_ ` and ` '_static ` are not valid lifetime parameters .
59
59
60
60
### Const generics
61
61
@@ -294,7 +294,6 @@ struct Foo<#[my_flexible_clone(unbounded)] H> {
294
294
```
295
295
296
296
[ IDENTIFIER ] : ../identifiers.md
297
- [ LIFETIME_OR_LABEL ] : ../tokens.md#lifetimes-and-loop-labels
298
297
299
298
[ _ForLifetimes_ ] : ../trait-bounds.md#higher-ranked-trait-bounds
300
299
[ _LifetimeParam_ ] : #generic-parameters
Original file line number Diff line number Diff line change @@ -762,8 +762,6 @@ r[lex.token.life.syntax]
762
762
>
763
763
> LIFETIME_OR_LABEL :\
764
764
>   ;  ;   ;  ; ` ' ` [ NON_KEYWORD_IDENTIFIER] [ identifier ]
765
- > _ (not immediately followed by ` ' ` )_ \
766
- >   ;  ; | ` '_ `
767
765
> _ (not immediately followed by ` ' ` )_
768
766
769
767
r[ lex.token.life.intro]
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ r[bound.syntax]
21
21
>
22
22
> _ Lifetime_ :\
23
23
>   ;  ;   ;  ; [ LIFETIME_OR_LABEL] \
24
- >   ;  ; | ` 'static `
24
+ >   ;  ; | ` 'static ` \
25
+ >   ;  ; | ` '_ `
25
26
>
26
27
> _ UseBound_ :\
27
28
>   ;  ; ` use ` _ UseBoundGenericArgs_
You can’t perform that action at this time.
0 commit comments