mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 06:14:55 +00:00
include file itself in SourceFileItems
This commit is contained in:
parent
244f9a142f
commit
a9e4142f43
@ -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> {
|
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 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
|
source_file
|
||||||
.syntax()
|
.syntax()
|
||||||
.descendants()
|
.descendants()
|
||||||
|
Loading…
Reference in New Issue
Block a user