diff options
-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() |