mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
move Semantics::visit_file_defs to ide_db::helpers
This commit is contained in:
parent
a1c96e04be
commit
41745f48d5
4 changed files with 33 additions and 27 deletions
|
@ -2,6 +2,7 @@ use either::Either;
|
|||
use hir::{HasSource, Semantics};
|
||||
use ide_db::{
|
||||
base_db::{FileId, FilePosition, FileRange},
|
||||
helpers::visit_file_defs,
|
||||
RootDatabase,
|
||||
};
|
||||
use syntax::{ast::NameOwner, AstNode, TextRange, TextSize};
|
||||
|
@ -75,7 +76,7 @@ pub(crate) fn annotations(
|
|||
}
|
||||
}
|
||||
|
||||
Semantics::new(db).visit_file_defs(file_id, &mut |def| match def {
|
||||
visit_file_defs(&Semantics::new(db), file_id, &mut |def| match def {
|
||||
Either::Left(def) => {
|
||||
let node = match def {
|
||||
hir::ModuleDef::Const(konst) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue