mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Minor refactoring
This commit is contained in:
parent
b75803ad31
commit
0df70d37fc
3 changed files with 15 additions and 18 deletions
|
@ -3139,15 +3139,15 @@ impl Type {
|
|||
}
|
||||
|
||||
pub fn is_closure(&self) -> bool {
|
||||
matches!(&self.ty.kind(Interner), TyKind::Closure { .. })
|
||||
matches!(self.ty.kind(Interner), TyKind::Closure { .. })
|
||||
}
|
||||
|
||||
pub fn is_fn(&self) -> bool {
|
||||
matches!(&self.ty.kind(Interner), TyKind::FnDef(..) | TyKind::Function { .. })
|
||||
matches!(self.ty.kind(Interner), TyKind::FnDef(..) | TyKind::Function { .. })
|
||||
}
|
||||
|
||||
pub fn is_array(&self) -> bool {
|
||||
matches!(&self.ty.kind(Interner), TyKind::Array(..))
|
||||
matches!(self.ty.kind(Interner), TyKind::Array(..))
|
||||
}
|
||||
|
||||
pub fn is_packed(&self, db: &dyn HirDatabase) -> bool {
|
||||
|
@ -3164,7 +3164,7 @@ impl Type {
|
|||
}
|
||||
|
||||
pub fn is_raw_ptr(&self) -> bool {
|
||||
matches!(&self.ty.kind(Interner), TyKind::Raw(..))
|
||||
matches!(self.ty.kind(Interner), TyKind::Raw(..))
|
||||
}
|
||||
|
||||
pub fn contains_unknown(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue