@@ -769,6 +769,9 @@ r[lex.token.life.syntax]
769769> RAW_LIFETIME :\
770770>   ;  ; ` 'r# ` [ IDENTIFIER_OR_KEYWORD] [ identifier ] <sub >* Except ` crate ` , ` self ` , ` super ` , ` Self ` * </sub >
771771> _ (not immediately followed by ` ' ` )_
772+ >
773+ > RESERVED_RAW_LIFETIME : ` 'r#_ `
774+ > _ (not immediately followed by ` ' ` )_
772775
773776r[ lex.token.life.intro]
774777Lifetime parameters and [ loop labels] use LIFETIME_OR_LABEL tokens. Any
@@ -781,6 +784,9 @@ A raw lifetime is like a normal lifetime, but its identifier is prefixed by `r#`
781784r[ lex.token.life.raw.allowed]
782785Unlike a normal lifetime, a raw lifetime may be any strict or reserved keyword except the ones listed above for ` RAW_LIFETIME ` .
783786
787+ r[ lex.token.life.raw.reserved]
788+ It is an error to use the RESERVED_RAW_LIFETIME token ` 'r#_ ` in order to avoid confusion with the [ placeholder lifetime] .
789+
784790r[ lex.token.life.raw.edition2021]
785791> ** Edition differences** : Raw lifetimes are accepted in the 2021
786792> edition or later. In earlier additions the token ` 'r#lt ` is lexed as ` 'r # lt ` .
@@ -946,6 +952,7 @@ r[lex.token.reserved-prefix.edition2021]
946952[numeric types]: types/ numeric. md
947953[paths]: paths. md
948954[patterns]: patterns. md
955+ [placeholder lifetime]: lifetime- elision. md
949956[question]: expressions/ operator- expr. md#the- question- mark- operator
950957[range]: expressions/ range- expr. md
951958[rangepat]: patterns. md#range- patterns
0 commit comments