Add Callable modifier for variables that implements Fnonce

This commit is contained in:
GrayJack
2020-10-16 07:52:18 -03:00
parent 83d6bc7113
commit a483b5545d
2 changed files with 24 additions and 3 deletions

View File

@@ -763,7 +763,7 @@ fn highlight_def(db: &RootDatabase, def: Definition) -> Highlight {
if local.is_mut(db) || local.ty(db).is_mutable_reference() {
h |= HighlightModifier::Mutable;
}
if local.ty(db).as_callable(db).is_some() {
if local.ty(db).as_callable(db).is_some() || local.ty(db).impls_fnonce(db) {
h |= HighlightModifier::Callable;
}
return h;