mirror of https://github.com/rust-lang/reference
Merge pull request #1479 from mattheww/2024-03_lifetime_tokens
Lexer: say that lifetime-like tokens can't be immediately followed by '
This commit is contained in:
commit
54400709b0
|
@ -630,11 +630,14 @@ Examples of reserved forms:
|
||||||
|
|
||||||
> **<sup>Lexer</sup>**\
|
> **<sup>Lexer</sup>**\
|
||||||
> LIFETIME_TOKEN :\
|
> LIFETIME_TOKEN :\
|
||||||
> `'` [IDENTIFIER_OR_KEYWORD][identifier]\
|
> `'` [IDENTIFIER_OR_KEYWORD][identifier]
|
||||||
|
> _(not immediately followed by `'`)_\
|
||||||
> | `'_`
|
> | `'_`
|
||||||
|
> _(not immediately followed by `'`)_
|
||||||
>
|
>
|
||||||
> LIFETIME_OR_LABEL :\
|
> LIFETIME_OR_LABEL :\
|
||||||
> `'` [NON_KEYWORD_IDENTIFIER][identifier]
|
> `'` [NON_KEYWORD_IDENTIFIER][identifier]
|
||||||
|
> _(not immediately followed by `'`)_
|
||||||
|
|
||||||
Lifetime parameters and [loop labels] use LIFETIME_OR_LABEL tokens. Any
|
Lifetime parameters and [loop labels] use LIFETIME_OR_LABEL tokens. Any
|
||||||
LIFETIME_TOKEN will be accepted by the lexer, and for example, can be used in
|
LIFETIME_TOKEN will be accepted by the lexer, and for example, can be used in
|
||||||
|
|
Loading…
Reference in New Issue