mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
update assist to include more literals
This commit is contained in:
parent
094c1e7b86
commit
8103a10a78
5 changed files with 727 additions and 299 deletions
|
@ -3494,6 +3494,14 @@ impl Type {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_scalar(&self) -> bool {
|
||||
matches!(self.ty.kind(Interner), TyKind::Scalar(_))
|
||||
}
|
||||
|
||||
pub fn is_tuple(&self) -> bool {
|
||||
matches!(self.ty.kind(Interner), TyKind::Tuple(..))
|
||||
}
|
||||
|
||||
pub fn remove_ref(&self) -> Option<Type> {
|
||||
match &self.ty.kind(Interner) {
|
||||
TyKind::Ref(.., ty) => Some(self.derived(ty.clone())),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue