Don't complete values in type position
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -35,8 +35,9 @@ pub enum PathResolution {
|
||||
Def(ModuleDef),
|
||||
/// A local binding (only value namespace)
|
||||
Local(Local),
|
||||
/// A generic parameter
|
||||
/// A type parameter
|
||||
TypeParam(TypeParam),
|
||||
/// A const parameter
|
||||
ConstParam(ConstParam),
|
||||
SelfType(Impl),
|
||||
Macro(MacroDef),
|
||||
|
||||
Reference in New Issue
Block a user