aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/annotations.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-03-15 11:18:52 +0000
committerLukas Wirth <[email protected]>2021-03-15 11:18:52 +0000
commit41745f48d5f867ff0896ce7906b5b4c04e72a767 (patch)
tree8a70342d903be16b20c62f8800a59af368ffb012 /crates/ide/src/annotations.rs
parenta1c96e04be55b3412e5510fc8d09cd82675dd4cd (diff)
move Semantics::visit_file_defs to ide_db::helpers
Diffstat (limited to 'crates/ide/src/annotations.rs')
-rw-r--r--crates/ide/src/annotations.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs
index c3422ce70..72492f826 100644
--- a/crates/ide/src/annotations.rs
+++ b/crates/ide/src/annotations.rs
@@ -2,6 +2,7 @@ use either::Either;
2use hir::{HasSource, Semantics}; 2use hir::{HasSource, Semantics};
3use ide_db::{ 3use ide_db::{
4 base_db::{FileId, FilePosition, FileRange}, 4 base_db::{FileId, FilePosition, FileRange},
5 helpers::visit_file_defs,
5 RootDatabase, 6 RootDatabase,
6}; 7};
7use syntax::{ast::NameOwner, AstNode, TextRange, TextSize}; 8use syntax::{ast::NameOwner, AstNode, TextRange, TextSize};
@@ -75,7 +76,7 @@ pub(crate) fn annotations(
75 } 76 }
76 } 77 }
77 78
78 Semantics::new(db).visit_file_defs(file_id, &mut |def| match def { 79 visit_file_defs(&Semantics::new(db), file_id, &mut |def| match def {
79 Either::Left(def) => { 80 Either::Left(def) => {
80 let node = match def { 81 let node = match def {
81 hir::ModuleDef::Const(konst) => { 82 hir::ModuleDef::Const(konst) => {