diff options
Diffstat (limited to 'crates/ra_hir_ty/src/infer/pat.rs')
-rw-r--r-- | crates/ra_hir_ty/src/infer/pat.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs index 7a84e47f8..baed6225b 100644 --- a/crates/ra_hir_ty/src/infer/pat.rs +++ b/crates/ra_hir_ty/src/infer/pat.rs | |||
@@ -12,9 +12,9 @@ use hir_expand::name::Name; | |||
12 | use test_utils::tested_by; | 12 | use test_utils::tested_by; |
13 | 13 | ||
14 | use super::{BindingMode, InferenceContext}; | 14 | use super::{BindingMode, InferenceContext}; |
15 | use crate::{db::HirDatabase, utils::variant_data, Substs, Ty, TypeCtor}; | 15 | use crate::{utils::variant_data, Substs, Ty, TypeCtor}; |
16 | 16 | ||
17 | impl<'a, D: HirDatabase> InferenceContext<'a, D> { | 17 | impl<'a> InferenceContext<'a> { |
18 | fn infer_tuple_struct_pat( | 18 | fn infer_tuple_struct_pat( |
19 | &mut self, | 19 | &mut self, |
20 | path: Option<&Path>, | 20 | path: Option<&Path>, |
@@ -23,7 +23,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
23 | default_bm: BindingMode, | 23 | default_bm: BindingMode, |
24 | ) -> Ty { | 24 | ) -> Ty { |
25 | let (ty, def) = self.resolve_variant(path); | 25 | let (ty, def) = self.resolve_variant(path); |
26 | let var_data = def.map(|it| variant_data(self.db, it)); | 26 | let var_data = def.map(|it| variant_data(self.db.upcast(), it)); |
27 | self.unify(&ty, expected); | 27 | self.unify(&ty, expected); |
28 | 28 | ||
29 | let substs = ty.substs().unwrap_or_else(Substs::empty); | 29 | let substs = ty.substs().unwrap_or_else(Substs::empty); |
@@ -51,7 +51,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
51 | id: PatId, | 51 | id: PatId, |
52 | ) -> Ty { | 52 | ) -> Ty { |
53 | let (ty, def) = self.resolve_variant(path); | 53 | let (ty, def) = self.resolve_variant(path); |
54 | let var_data = def.map(|it| variant_data(self.db, it)); | 54 | let var_data = def.map(|it| variant_data(self.db.upcast(), it)); |
55 | if let Some(variant) = def { | 55 | if let Some(variant) = def { |
56 | self.write_variant_resolution(id.into(), variant); | 56 | self.write_variant_resolution(id.into(), variant); |
57 | } | 57 | } |