diff options
| author | bors <bors@rust-lang.org> | 2024-04-19 05:38:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-19 05:38:13 +0000 |
| commit | 0ed85d0c8d225b4eac2085dc11d89b4e7455175a (patch) | |
| tree | 95590b78726ee19dcc1f2ade18b9d6ddc7b28e74 /compiler/rustc_parse/src | |
| parent | 13e63f7490109eecf905fa51190eacbe8051aefd (diff) | |
| parent | c8d58faba29805c499eb121ba6359b1284c8f293 (diff) | |
| download | rust-0ed85d0c8d225b4eac2085dc11d89b4e7455175a.tar.gz rust-0ed85d0c8d225b4eac2085dc11d89b4e7455175a.zip | |
Auto merge of #124147 - workingjubilee:rollup-7pjnzr6, r=workingjubilee
Rollup of 7 pull requests Successful merges: - #123406 (Force exhaustion in iter::ArrayChunks::into_remainder) - #123752 (Properly handle emojis as literal prefix in macros) - #123935 (Don't inline integer literals when they overflow - new attempt) - #123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc) - #124019 (Use raw-dylib for Windows synchronization functions) - #124110 (Fix negating `f16` and `f128` constants) - #124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/lexer/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs index 058539e1717..1abb1d29562 100644 --- a/compiler/rustc_parse/src/lexer/mod.rs +++ b/compiler/rustc_parse/src/lexer/mod.rs @@ -204,6 +204,7 @@ impl<'psess, 'src> StringReader<'psess, 'src> { self.ident(start) } rustc_lexer::TokenKind::InvalidIdent + | rustc_lexer::TokenKind::InvalidPrefix // Do not recover an identifier with emoji if the codepoint is a confusable // with a recoverable substitution token, like `➖`. if !UNICODE_ARRAY @@ -301,7 +302,9 @@ impl<'psess, 'src> StringReader<'psess, 'src> { rustc_lexer::TokenKind::Caret => token::BinOp(token::Caret), rustc_lexer::TokenKind::Percent => token::BinOp(token::Percent), - rustc_lexer::TokenKind::Unknown | rustc_lexer::TokenKind::InvalidIdent => { + rustc_lexer::TokenKind::Unknown + | rustc_lexer::TokenKind::InvalidIdent + | rustc_lexer::TokenKind::InvalidPrefix => { // Don't emit diagnostics for sequences of the same invalid token if swallow_next_invalid > 0 { swallow_next_invalid -= 1; |
