diff options
author | Aleksey Kladov <[email protected]> | 2018-12-04 18:21:39 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-04 18:21:39 +0000 |
commit | a9e4142f434b1a2aa0729387534121fdf9c812a6 (patch) | |
tree | cea6c62b4084f40c9554a45dc220c32ae508957c /crates/ra_hir | |
parent | 244f9a142f0593ab5847163d1832e464e2524c4b (diff) |
include file itself in SourceFileItems
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/query_definitions.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir/src/query_definitions.rs b/crates/ra_hir/src/query_definitions.rs index 6f602878c..59318f307 100644 --- a/crates/ra_hir/src/query_definitions.rs +++ b/crates/ra_hir/src/query_definitions.rs | |||
@@ -36,9 +36,10 @@ pub(super) fn fn_scopes(db: &impl HirDatabase, fn_id: FnId) -> Arc<FnScopes> { | |||
36 | } | 36 | } |
37 | 37 | ||
38 | pub(super) fn file_items(db: &impl HirDatabase, file_id: FileId) -> Arc<SourceFileItems> { | 38 | pub(super) fn file_items(db: &impl HirDatabase, file_id: FileId) -> Arc<SourceFileItems> { |
39 | let mut res = SourceFileItems::default(); | ||
39 | let source_file = db.source_file(file_id); | 40 | let source_file = db.source_file(file_id); |
41 | res.alloc(source_file.syntax().owned()); | ||
40 | let source_file = source_file.borrowed(); | 42 | let source_file = source_file.borrowed(); |
41 | let mut res = SourceFileItems::default(); | ||
42 | source_file | 43 | source_file |
43 | .syntax() | 44 | .syntax() |
44 | .descendants() | 45 | .descendants() |