mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
include file itself in SourceFileItems
This commit is contained in:
parent
244f9a142f
commit
a9e4142f43
1 changed files with 3 additions and 2 deletions
|
@ -36,9 +36,10 @@ pub(super) fn fn_scopes(db: &impl HirDatabase, fn_id: FnId) -> Arc<FnScopes> {
|
|||
}
|
||||
|
||||
pub(super) fn file_items(db: &impl HirDatabase, file_id: FileId) -> Arc<SourceFileItems> {
|
||||
let source_file = db.source_file(file_id);
|
||||
let source_file = source_file.borrowed();
|
||||
let mut res = SourceFileItems::default();
|
||||
let source_file = db.source_file(file_id);
|
||||
res.alloc(source_file.syntax().owned());
|
||||
let source_file = source_file.borrowed();
|
||||
source_file
|
||||
.syntax()
|
||||
.descendants()
|
||||
|
|
Loading…
Reference in a new issue