diff options
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 6 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 10 |
3 files changed, 5 insertions, 15 deletions
diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 407322dc1..d6df48db2 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml | |||
@@ -27,8 +27,8 @@ test_utils = { path = "../test_utils" } | |||
27 | 27 | ||
28 | scoped-tls = "1" | 28 | scoped-tls = "1" |
29 | 29 | ||
30 | chalk-solve = { version = "0.15.0-dev.0", git = "https://github.com/rust-lang/chalk" } | 30 | chalk-solve = { version = "0.15.0" } |
31 | chalk-ir = { version = "0.15.0-dev.0", git = "https://github.com/rust-lang/chalk" } | 31 | chalk-ir = { version = "0.15.0" } |
32 | 32 | ||
33 | [dev-dependencies] | 33 | [dev-dependencies] |
34 | insta = "0.16.0" | 34 | insta = "0.16.0" |
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index 61af5f064..22884522a 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -785,11 +785,7 @@ impl<'a> InferenceContext<'a> { | |||
785 | for &check_closures in &[false, true] { | 785 | for &check_closures in &[false, true] { |
786 | let param_iter = param_tys.iter().cloned().chain(repeat(Ty::Unknown)); | 786 | let param_iter = param_tys.iter().cloned().chain(repeat(Ty::Unknown)); |
787 | for (&arg, param_ty) in args.iter().zip(param_iter) { | 787 | for (&arg, param_ty) in args.iter().zip(param_iter) { |
788 | let is_closure = match &self.body[arg] { | 788 | let is_closure = matches!(&self.body[arg], Expr::Lambda { .. }); |
789 | Expr::Lambda { .. } => true, | ||
790 | _ => false, | ||
791 | }; | ||
792 | |||
793 | if is_closure != check_closures { | 789 | if is_closure != check_closures { |
794 | continue; | 790 | continue; |
795 | } | 791 | } |
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs index 414158139..c9513b752 100644 --- a/crates/ra_hir_ty/src/lib.rs +++ b/crates/ra_hir_ty/src/lib.rs | |||
@@ -620,17 +620,11 @@ pub enum GenericPredicate { | |||
620 | 620 | ||
621 | impl GenericPredicate { | 621 | impl GenericPredicate { |
622 | pub fn is_error(&self) -> bool { | 622 | pub fn is_error(&self) -> bool { |
623 | match self { | 623 | matches!(self, GenericPredicate::Error) |
624 | GenericPredicate::Error => true, | ||
625 | _ => false, | ||
626 | } | ||
627 | } | 624 | } |
628 | 625 | ||
629 | pub fn is_implemented(&self) -> bool { | 626 | pub fn is_implemented(&self) -> bool { |
630 | match self { | 627 | matches!(self, GenericPredicate::Implemented(_)) |
631 | GenericPredicate::Implemented(_) => true, | ||
632 | _ => false, | ||
633 | } | ||
634 | } | 628 | } |
635 | 629 | ||
636 | pub fn trait_ref(&self, db: &dyn HirDatabase) -> Option<TraitRef> { | 630 | pub fn trait_ref(&self, db: &dyn HirDatabase) -> Option<TraitRef> { |