diff options
| author | bors <bors@rust-lang.org> | 2024-11-19 23:04:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-19 23:04:44 +0000 |
| commit | 875df370be806c837f58abb638329905e969ace4 (patch) | |
| tree | e58327bc327f3c89302c8bec41621e87ffa96838 /compiler/rustc_parse/src | |
| parent | ee612c45f00391aff71ec0c52b7fc08fae18c711 (diff) | |
| parent | 2467654917affe354b6b5fc4fae464c07ecbf2e9 (diff) | |
| download | rust-875df370be806c837f58abb638329905e969ace4.tar.gz rust-875df370be806c837f58abb638329905e969ace4.zip | |
Auto merge of #133219 - matthiaskrgr:rollup-hnuq0zf, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #123947 (Add vec_deque::Iter::as_slices and friends) - #125405 (Add std::thread::add_spawn_hook.) - #133175 (ci: use free runner in dist-i686-msvc) - #133183 (Mention std::fs::remove_dir_all in std::fs::remove_dir) - #133188 (Add `visit` methods to ast nodes that already have `walk`s on ast visitors) - #133201 (Remove `TokenKind::InvalidPrefix`) - #133207 (Default-enable `llvm_tools_enabled` when no `config.toml` is present) - #133213 (Correct the tier listing of `wasm32-wasip2`) 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, 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; |
