mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Do not add default and closure types in 'add explicit type' assist
This commit is contained in:
parent
7ab28cacbb
commit
ce06a6b422
2 changed files with 47 additions and 5 deletions
|
@ -1132,6 +1132,10 @@ impl Type {
|
|||
Some(self.ty.value.as_callable()?.0)
|
||||
}
|
||||
|
||||
pub fn is_closure(&self) -> bool {
|
||||
matches!(&self.ty.value, Ty::Apply(ApplicationTy { ctor: TypeCtor::Closure { .. }, .. }))
|
||||
}
|
||||
|
||||
pub fn contains_unknown(&self) -> bool {
|
||||
return go(&self.ty.value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue