mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Merge #10937
10937: fix: Add highlighting hack back for unresolved attributes r=Veykril a=Veykril cc https://github.com/rust-analyzer/rust-analyzer/issues/10935 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
1cf1359c55
1 changed files with 7 additions and 0 deletions
|
@ -262,6 +262,13 @@ fn highlight_name_ref(
|
||||||
None if name_ref.self_token().is_some() && is_in_fn_with_self_param(&name_ref) => {
|
None if name_ref.self_token().is_some() && is_in_fn_with_self_param(&name_ref) => {
|
||||||
return SymbolKind::SelfParam.into()
|
return SymbolKind::SelfParam.into()
|
||||||
}
|
}
|
||||||
|
// FIXME: This is required for helper attributes used by proc-macros, as those do not map down
|
||||||
|
// to anything when used.
|
||||||
|
// We can fix this for derive attributes since derive helpers are recorded, but not for
|
||||||
|
// general attributes.
|
||||||
|
None if name_ref.syntax().ancestors().any(|it| it.kind() == ATTR) => {
|
||||||
|
return HlTag::Symbol(SymbolKind::Attribute).into();
|
||||||
|
}
|
||||||
None => return HlTag::UnresolvedReference.into(),
|
None => return HlTag::UnresolvedReference.into(),
|
||||||
};
|
};
|
||||||
let mut h = match name_class {
|
let mut h = match name_class {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue