Don't complete values in type position

This commit is contained in:
Lukas Wirth 2021-06-08 16:50:10 +02:00
parent 590472607c
commit 1d74ef1d98
8 changed files with 76 additions and 55 deletions

View file

@ -2496,6 +2496,18 @@ 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 {