Fix panic in syntax_highlighting

This commit is contained in:
Lukas Wirth 2025-08-22 08:58:48 +02:00
parent 14872a5332
commit 0914f78f23
2 changed files with 30 additions and 28 deletions

View file

@ -452,10 +452,10 @@ fn traverse(
}
hl
}
NodeOrToken::Token(token) => {
NodeOrToken::Token(token) => salsa::attach(sema.db, || {
highlight::token(sema, token, edition, &is_unsafe_node, tt_level > 0)
.zip(Some(None))
}
}),
};
if let Some((mut highlight, binding_hash)) = element {
if is_unlinked && highlight.tag == HlTag::UnresolvedReference {