diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-18 06:22:07 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-18 06:22:07 +0000 |
commit | 8b95c0e0c22a67d486c08416175c79b99da5acd9 (patch) | |
tree | 0847a835f1ab643a77b00b2b696a33c91c0b9946 /crates/ra_hir/src/db.rs | |
parent | b5df9656245079d3dc4457ae326f9710ff58a298 (diff) | |
parent | b82db684003b817d47c1bc8c0d3c6afc88be2663 (diff) |
Merge #850
850: Handle tuple structs / enum variants properly in type inference r=matklad a=flodiebold
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 740a7be7a..fc0ee068c 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -15,7 +15,7 @@ use crate::{ | |||
15 | adt::{StructData, EnumData}, | 15 | adt::{StructData, EnumData}, |
16 | impl_block::{ModuleImplBlocks, ImplSourceMap}, | 16 | impl_block::{ModuleImplBlocks, ImplSourceMap}, |
17 | generics::{GenericParams, GenericDef}, | 17 | generics::{GenericParams, GenericDef}, |
18 | ids::SourceFileItemId, | 18 | ids::SourceFileItemId, nameres::Namespace |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[salsa::query_group(PersistentHirDatabaseStorage)] | 21 | #[salsa::query_group(PersistentHirDatabaseStorage)] |
@@ -88,7 +88,7 @@ pub trait HirDatabase: PersistentHirDatabase { | |||
88 | fn infer(&self, func: Function) -> Arc<InferenceResult>; | 88 | fn infer(&self, func: Function) -> Arc<InferenceResult>; |
89 | 89 | ||
90 | #[salsa::invoke(crate::ty::type_for_def)] | 90 | #[salsa::invoke(crate::ty::type_for_def)] |
91 | fn type_for_def(&self, def: TypableDef) -> Ty; | 91 | fn type_for_def(&self, def: TypableDef, ns: Namespace) -> Ty; |
92 | 92 | ||
93 | #[salsa::invoke(crate::ty::type_for_field)] | 93 | #[salsa::invoke(crate::ty::type_for_field)] |
94 | fn type_for_field(&self, field: StructField) -> Ty; | 94 | fn type_for_field(&self, field: StructField) -> Ty; |