diff options
author | Florian Diebold <[email protected]> | 2018-12-25 20:40:33 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-25 20:40:33 +0000 |
commit | bc745a139674f289386f3081458793f756cab5b9 (patch) | |
tree | 518c38ce87807c76644b512ce0213dd01e43614a /crates/ra_hir/src/db.rs | |
parent | cdca39706121b2d1734a94938a2372da881e10c6 (diff) |
Resolve field types lazily
I.e. not already when getting the HIR for the struct.
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 113790ee9..e7f9afa77 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -1,6 +1,7 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use ra_syntax::{ | 3 | use ra_syntax::{ |
4 | SmolStr, | ||
4 | SyntaxNode, | 5 | SyntaxNode, |
5 | ast::FnDefNode, | 6 | ast::FnDefNode, |
6 | }; | 7 | }; |
@@ -52,6 +53,11 @@ pub trait HirDatabase: SyntaxDatabase | |||
52 | use fn query_definitions::type_for_def; | 53 | use fn query_definitions::type_for_def; |
53 | } | 54 | } |
54 | 55 | ||
56 | fn type_for_field(def_id: DefId, field: SmolStr) -> Cancelable<Ty> { | ||
57 | type TypeForFieldQuery; | ||
58 | use fn query_definitions::type_for_field; | ||
59 | } | ||
60 | |||
55 | fn file_items(file_id: FileId) -> Arc<SourceFileItems> { | 61 | fn file_items(file_id: FileId) -> Arc<SourceFileItems> { |
56 | type SourceFileItemsQuery; | 62 | type SourceFileItemsQuery; |
57 | use fn query_definitions::file_items; | 63 | use fn query_definitions::file_items; |