diff options
| author | Ralf Jung <post@ralfj.de> | 2024-11-21 07:25:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-21 07:25:52 +0000 |
| commit | 12ac750f9bf4ecfb45e44773ca4dd5c414d9bd7b (patch) | |
| tree | 4c4fbb89bcbcdfb75627bf0ce9255f124944e664 /compiler/rustc_parse/src | |
| parent | 7e6c8d21c61b1b6471c316df98cd119e5cb5fe46 (diff) | |
| parent | ec6fe118d9f11c236288a589113db887cade703c (diff) | |
| download | rust-12ac750f9bf4ecfb45e44773ca4dd5c414d9bd7b.tar.gz rust-12ac750f9bf4ecfb45e44773ca4dd5c414d9bd7b.zip | |
Merge pull request #4044 from RalfJung/rustup
Rustup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/lexer/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs index 226de65445c..5023e83bd67 100644 --- a/compiler/rustc_parse/src/lexer/mod.rs +++ b/compiler/rustc_parse/src/lexer/mod.rs @@ -213,7 +213,7 @@ impl<'psess, 'src> StringReader<'psess, 'src> { let ident = Symbol::intern(lifetime_name); token::Lifetime(ident, IdentIsRaw::No) } - rustc_lexer::TokenKind::InvalidIdent | rustc_lexer::TokenKind::InvalidPrefix + rustc_lexer::TokenKind::InvalidIdent // Do not recover an identifier with emoji if the codepoint is a confusable // with a recoverable substitution token, like `➖`. if !UNICODE_ARRAY.iter().any(|&(c, _, _)| { @@ -359,8 +359,7 @@ impl<'psess, 'src> StringReader<'psess, 'src> { rustc_lexer::TokenKind::Percent => token::BinOp(token::Percent), rustc_lexer::TokenKind::Unknown - | rustc_lexer::TokenKind::InvalidIdent - | rustc_lexer::TokenKind::InvalidPrefix => { + | rustc_lexer::TokenKind::InvalidIdent => { // Don't emit diagnostics for sequences of the same invalid token if swallow_next_invalid > 0 { swallow_next_invalid -= 1; |
