diff options
Diffstat (limited to 'crates/hir_ty/src/lib.rs')
-rw-r--r-- | crates/hir_ty/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs index 76609e2df..d1513df1f 100644 --- a/crates/hir_ty/src/lib.rs +++ b/crates/hir_ty/src/lib.rs | |||
@@ -290,7 +290,7 @@ impl Ty { | |||
290 | Some(db.lookup_intern_callable_def(callable.into()).into()) | 290 | Some(db.lookup_intern_callable_def(callable.into()).into()) |
291 | } | 291 | } |
292 | TyKind::AssociatedType(type_alias, ..) => Some(from_assoc_type_id(type_alias).into()), | 292 | TyKind::AssociatedType(type_alias, ..) => Some(from_assoc_type_id(type_alias).into()), |
293 | TyKind::ForeignType(type_alias, ..) => Some(from_foreign_def_id(type_alias).into()), | 293 | TyKind::Foreign(type_alias, ..) => Some(from_foreign_def_id(type_alias).into()), |
294 | _ => None, | 294 | _ => None, |
295 | } | 295 | } |
296 | } | 296 | } |
@@ -300,7 +300,7 @@ impl Ty { | |||
300 | } | 300 | } |
301 | 301 | ||
302 | pub fn is_unknown(&self) -> bool { | 302 | pub fn is_unknown(&self) -> bool { |
303 | matches!(self.kind(&Interner), TyKind::Unknown) | 303 | matches!(self.kind(&Interner), TyKind::Error) |
304 | } | 304 | } |
305 | 305 | ||
306 | pub fn equals_ctor(&self, other: &Ty) -> bool { | 306 | pub fn equals_ctor(&self, other: &Ty) -> bool { |
@@ -312,7 +312,7 @@ impl Ty { | |||
312 | (TyKind::AssociatedType(ty_id, ..), TyKind::AssociatedType(ty_id2, ..)) => { | 312 | (TyKind::AssociatedType(ty_id, ..), TyKind::AssociatedType(ty_id2, ..)) => { |
313 | ty_id == ty_id2 | 313 | ty_id == ty_id2 |
314 | } | 314 | } |
315 | (TyKind::ForeignType(ty_id, ..), TyKind::ForeignType(ty_id2, ..)) => ty_id == ty_id2, | 315 | (TyKind::Foreign(ty_id, ..), TyKind::Foreign(ty_id2, ..)) => ty_id == ty_id2, |
316 | (TyKind::Closure(id1, _), TyKind::Closure(id2, _)) => id1 == id2, | 316 | (TyKind::Closure(id1, _), TyKind::Closure(id2, _)) => id1 == id2, |
317 | (TyKind::Ref(mutability, ..), TyKind::Ref(mutability2, ..)) | 317 | (TyKind::Ref(mutability, ..), TyKind::Ref(mutability2, ..)) |
318 | | (TyKind::Raw(mutability, ..), TyKind::Raw(mutability2, ..)) => { | 318 | | (TyKind::Raw(mutability, ..), TyKind::Raw(mutability2, ..)) => { |