Filter out non-type completions in the respective completions modules instead

This commit is contained in:
Lukas Wirth 2021-06-16 15:08:44 +02:00
parent 79703efc7f
commit 354ad29493
6 changed files with 95 additions and 72 deletions

View file

@ -2688,18 +2688,6 @@ impl ScopeDef {
items
}
pub fn is_value_def(&self) -> bool {
matches!(
self,
ScopeDef::ModuleDef(ModuleDef::Function(_))
| ScopeDef::ModuleDef(ModuleDef::Variant(_))
| ScopeDef::ModuleDef(ModuleDef::Const(_))
| ScopeDef::ModuleDef(ModuleDef::Static(_))
| ScopeDef::GenericParam(GenericParam::ConstParam(_))
| ScopeDef::Local(_)
)
}
}
impl From<ItemInNs> for ScopeDef {