aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorChetan Khilosiya <[email protected]>2021-03-15 20:28:21 +0000
committerChetan Khilosiya <[email protected]>2021-03-15 20:28:21 +0000
commit847ec9e84049fb51b0d8d9b3e7b167764fb93d9d (patch)
treebbf8ce56732a104817285ca5456cb0e18fa9e082 /crates/hir
parent714836959be857e2fbd9c497974055deb2a91f9b (diff)
7709: Import changes.
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs6
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> {