Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit bb51fb3

Browse files
Fix tools
1 parent d719eb2 commit bb51fb3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/librustdoc/html/highlight.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,9 @@ impl<'src> Classifier<'src> {
879879
| TokenKind::UnknownPrefix
880880
| TokenKind::InvalidPrefix
881881
| TokenKind::InvalidIdent => Class::Ident(self.new_span(before, text)),
882-
TokenKind::Lifetime { .. } => Class::Lifetime,
882+
TokenKind::Lifetime { .. }
883+
| TokenKind::RawLifetimePrefix
884+
| TokenKind::UnknownPrefixLifetime => Class::Lifetime,
883885
TokenKind::Eof => panic!("Eof in advance"),
884886
};
885887
// Anything that didn't return above is the simple case where we the

src/tools/rustfmt/src/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ fn force_space_before(tok: &TokenKind) -> bool {
10731073
fn ident_like(tok: &Token) -> bool {
10741074
matches!(
10751075
tok.kind,
1076-
TokenKind::Ident(..) | TokenKind::Literal(..) | TokenKind::Lifetime(_)
1076+
TokenKind::Ident(..) | TokenKind::Literal(..) | TokenKind::Lifetime(..)
10771077
)
10781078
}
10791079

@@ -1098,7 +1098,7 @@ fn next_space(tok: &TokenKind) -> SpaceState {
10981098
| TokenKind::OpenDelim(_)
10991099
| TokenKind::CloseDelim(_) => SpaceState::Never,
11001100

1101-
TokenKind::Literal(..) | TokenKind::Ident(..) | TokenKind::Lifetime(_) => SpaceState::Ident,
1101+
TokenKind::Literal(..) | TokenKind::Ident(..) | TokenKind::Lifetime(..) => SpaceState::Ident,
11021102

11031103
_ => SpaceState::Always,
11041104
}

0 commit comments

Comments
 (0)