Don't recover lifetimes/labels containing emojis as character literals

Note that at the time of this commit, `unic-emoji-char` seems to have
data tables only up to Unicode 5.0, but Unicode is already newer than
this.

A newer emoji such as `🥺` will not be recognized as an emoji
but older emojis such as `🐱` will.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2023-02-14 17:31:58 +08:00
parent c3c6d73b04
commit 380fa26413
No known key found for this signature in database
GPG key ID: C5FD5D32014FDB47
5 changed files with 173 additions and 12 deletions

View file

@ -471,6 +471,8 @@ pub enum StashKey {
/// When an invalid lifetime e.g. `'2` should be reinterpreted
/// as a char literal in the parser
LifetimeIsChar,
/// When an invalid lifetime e.g. `'🐱` contains emoji.
LifetimeContainsEmoji,
/// Maybe there was a typo where a comma was forgotten before
/// FRU syntax
MaybeFruTypo,