diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-19 15:55:34 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-19 18:06:22 +1100 |
| commit | e9a0c3c98c5640070e15a3cb38860a7268c1dca2 (patch) | |
| tree | 742f8f8a71c208ec8fce000b9d9b8bf2661a5b7e /src/librustdoc/html/highlight.rs | |
| parent | 2c7c3697dbaac3e0599aa0e7cd3581822caec17b (diff) | |
| download | rust-e9a0c3c98c5640070e15a3cb38860a7268c1dca2.tar.gz rust-e9a0c3c98c5640070e15a3cb38860a7268c1dca2.zip | |
Remove `TokenKind::InvalidPrefix`.
It was added in #123752 to handle some cases involving emoji, but it isn't necessary because it's always treated the same as `TokenKind::InvalidIdent`. This commit removes it, which makes things a little simpler.
Diffstat (limited to 'src/librustdoc/html/highlight.rs')
| -rw-r--r-- | src/librustdoc/html/highlight.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index 4def80764ea..29f6f92a6b2 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -861,10 +861,9 @@ impl<'src> Classifier<'src> { }, Some(c) => c, }, - TokenKind::RawIdent - | TokenKind::UnknownPrefix - | TokenKind::InvalidPrefix - | TokenKind::InvalidIdent => Class::Ident(self.new_span(before, text)), + TokenKind::RawIdent | TokenKind::UnknownPrefix | TokenKind::InvalidIdent => { + Class::Ident(self.new_span(before, text)) + } TokenKind::Lifetime { .. } | TokenKind::RawLifetime | TokenKind::UnknownPrefixLifetime => Class::Lifetime, |
