mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Don't complete values in type position
This commit is contained in:
parent
590472607c
commit
1d74ef1d98
8 changed files with 76 additions and 55 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue