Skip to content

Commit f04cd63

Browse files
committed
Clarify raw lifetime cannot be certain keywords
Update for rust-lang/rust#132363
1 parent 5c0c306 commit f04cd63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/tokens.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ r[lex.token.life.syntax]
767767
>    | RAW_LIFETIME
768768
>
769769
> RAW_LIFETIME :\
770-
>    `'r#` [IDENTIFIER_OR_KEYWORD][identifier]
770+
> &nbsp;&nbsp; `'r#` [IDENTIFIER_OR_KEYWORD][identifier] <sub>*Except `crate`, `self`, `super`, `Self`*</sub>
771771
> _(not immediately followed by `'`)_
772772
773773
r[lex.token.life.intro]
@@ -779,7 +779,7 @@ r[lex.token.life.raw.intro]
779779
A raw lifetime is like a normal lifetime, but its identifier is prefixed by `r#`. (Note that the `r#` prefix is not included as part of the actual lifetime.)
780780

781781
r[lex.token.life.raw.allowed]
782-
Unlike a normal lifetime, a raw lifetime may be any strict or reserved keyword.
782+
Unlike a normal lifetime, a raw lifetime may be any strict or reserved keyword except the ones listed above for `RAW_LIFETIME`.
783783

784784
> **Edition differences**: Raw lifetimes are accepted in the 2021
785785
> edition or later. In earlier additions the token `'r#lt` is lexed as `'r # lt`.

0 commit comments

Comments
 (0)