summaryrefslogtreecommitdiff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-16 21:37:51 +0000
committerbors <bors@rust-lang.org>2023-04-16 21:37:51 +0000
commit84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc (patch)
tree45864520870b60ee1bb662685becc5f0b4804744 /compiler/rustc_parse/src
parentf18236dcd3d8191c91aca0c4ef43e1e27b6bc0dc (diff)
parentc2c413f56eca868a5b5335ba21efa08368735d01 (diff)
downloadrust-stable.tar.gz
Auto merge of #110413 - pietroalbini:pa-1.69.0-stable, r=pietroalbini1.69.0stable
[stable] Prepare Rust 1.69.0 Last minute backports: * #109643 * #110135 * #109938 * #109937 * #109266 This PR also bumps the channel to stable, and backports the release notes from master. r? `@ghost` cc `@rust-lang/release`
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/lexer/mod.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index 9dbddee5a56..59958a30917 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -223,21 +223,16 @@ impl<'a> StringReader<'a> {
};
token::Literal(token::Lit { kind, symbol, suffix })
}
- rustc_lexer::TokenKind::Lifetime { starts_with_number, contains_emoji } => {
+ rustc_lexer::TokenKind::Lifetime { starts_with_number } => {
// Include the leading `'` in the real identifier, for macro
// expansion purposes. See #12512 for the gory details of why
// this is necessary.
let lifetime_name = self.str_from(start);
if starts_with_number {
let span = self.mk_sp(start, self.pos);
- let mut diag = self.sess.struct_err("lifetimes or labels cannot start with a number");
+ let mut diag = self.sess.struct_err("lifetimes cannot start with a number");
diag.set_span(span);
diag.stash(span, StashKey::LifetimeIsChar);
- } else if contains_emoji {
- let span = self.mk_sp(start, self.pos);
- let mut diag = self.sess.struct_err("lifetimes or labels cannot contain emojis");
- diag.set_span(span);
- diag.stash(span, StashKey::LifetimeContainsEmoji);
}
let ident = Symbol::intern(lifetime_name);
token::Lifetime(ident)