mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
move to else f
This commit is contained in:
parent
2baef17bb1
commit
0f434b8620
1 changed files with 2 additions and 3 deletions
|
@ -489,13 +489,12 @@ fn highlight_def(db: &RootDatabase, krate: Option<hir::Crate>, def: Definition)
|
||||||
let ty = local.ty(db);
|
let ty = local.ty(db);
|
||||||
if local.is_mut(db) || ty.is_mutable_reference() {
|
if local.is_mut(db) || ty.is_mutable_reference() {
|
||||||
h |= HlMod::Mutable;
|
h |= HlMod::Mutable;
|
||||||
|
} else if local.is_ref(db) || ty.is_reference() {
|
||||||
|
h |= HlMod::Reference;
|
||||||
}
|
}
|
||||||
if ty.as_callable(db).is_some() || ty.impls_fnonce(db) {
|
if ty.as_callable(db).is_some() || ty.impls_fnonce(db) {
|
||||||
h |= HlMod::Callable;
|
h |= HlMod::Callable;
|
||||||
}
|
}
|
||||||
if local.is_ref(db) || ty.is_reference() {
|
|
||||||
h |= HlMod::Reference;
|
|
||||||
}
|
|
||||||
h
|
h
|
||||||
}
|
}
|
||||||
Definition::Label(_) => Highlight::new(HlTag::Symbol(SymbolKind::Label)),
|
Definition::Label(_) => Highlight::new(HlTag::Symbol(SymbolKind::Label)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue