diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir/src/lib.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 1a1454068..52939e990 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs | |||
@@ -52,6 +52,7 @@ use hir_ty::{ | |||
52 | autoderef, | 52 | autoderef, |
53 | display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter}, | 53 | display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter}, |
54 | method_resolution::{self, TyFingerprint}, | 54 | method_resolution::{self, TyFingerprint}, |
55 | primitive::UintTy, | ||
55 | to_assoc_type_id, | 56 | to_assoc_type_id, |
56 | traits::{FnTrait, Solution, SolutionVariables}, | 57 | traits::{FnTrait, Solution, SolutionVariables}, |
57 | AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate, | 58 | AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate, |
@@ -1632,10 +1633,7 @@ impl Type { | |||
1632 | } | 1633 | } |
1633 | 1634 | ||
1634 | pub fn is_usize(&self) -> bool { | 1635 | pub fn is_usize(&self) -> bool { |
1635 | matches!( | 1636 | matches!(self.ty.value.interned(&Interner), TyKind::Scalar(Scalar::Uint(UintTy::Usize))) |
1636 | self.ty.value.interned(&Interner), | ||
1637 | TyKind::Scalar(Scalar::Uint(hir_ty::primitive::UintTy::Usize)) | ||
1638 | ) | ||
1639 | } | 1637 | } |
1640 | 1638 | ||
1641 | pub fn remove_ref(&self) -> Option<Type> { | 1639 | pub fn remove_ref(&self) -> Option<Type> { |