Currently the apostrophe
' is a part of the lifetime name itself for historical reasons that are no longer relevant.
I don’t see obvious reasons for it to be the case now.
I suggest to move treatment of
' from the lexer to the parser and treat
lifetime as two consecutive tokens -
lifetimematcher (https://github.com/rust-lang/rust/issues/34303) is obsoleted, and existing
identmatcher can be used instead.
- Hygiene opt-opt (https://github.com/rust-lang/rust/pull/47992) in lifetimes can be naturally expressed as
- New: Raw identifiers (https://github.com/rust-lang/rust/issues/48589) in lifetimes can be naturally expressed as
- Probably some breakage to token-stream-based procedural macros 2.0.
Any problems with this change?
(This is not the entirely thought out proposal, but I wanted to leave it here for feedback today.)