diff --git a/crates/ra_ide/src/line_index.rs b/crates/ra_ide/src/ide_db/line_index.rs similarity index 99% rename from crates/ra_ide/src/line_index.rs rename to crates/ra_ide/src/ide_db/line_index.rs index 710890d27dc..6f99ca3a7b1 100644 --- a/crates/ra_ide/src/line_index.rs +++ b/crates/ra_ide/src/ide_db/line_index.rs @@ -1,6 +1,6 @@ //! FIXME: write short doc here -use crate::TextUnit; +use ra_syntax::TextUnit; use rustc_hash::FxHashMap; use superslice::Ext; diff --git a/crates/ra_ide/src/line_index_utils.rs b/crates/ra_ide/src/ide_db/line_index_utils.rs similarity index 99% rename from crates/ra_ide/src/line_index_utils.rs rename to crates/ra_ide/src/ide_db/line_index_utils.rs index bd1e08feba4..70bf7253c87 100644 --- a/crates/ra_ide/src/line_index_utils.rs +++ b/crates/ra_ide/src/ide_db/line_index_utils.rs @@ -1,9 +1,10 @@ //! FIXME: write short doc here -use crate::{line_index::Utf16Char, LineCol, LineIndex}; use ra_syntax::{TextRange, TextUnit}; use ra_text_edit::{AtomTextEdit, TextEdit}; +use crate::ide_db::line_index::{LineCol, LineIndex, Utf16Char}; + #[derive(Debug, Clone)] enum Step { Newline(TextUnit), diff --git a/crates/ra_ide/src/ide_db/mod.rs b/crates/ra_ide/src/ide_db/mod.rs index 47d0aed6fb5..cd47132ce81 100644 --- a/crates/ra_ide/src/ide_db/mod.rs +++ b/crates/ra_ide/src/ide_db/mod.rs @@ -1,5 +1,8 @@ //! FIXME: write short doc here +pub mod line_index; +pub mod line_index_utils; + use std::sync::Arc; use ra_db::{ @@ -10,8 +13,9 @@ use rustc_hash::FxHashMap; use crate::{ + ide_db::line_index::LineIndex, symbol_index::{self, SymbolsDatabase}, - FeatureFlags, LineIndex, + FeatureFlags, }; #[salsa::database( diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index f10c871b8a1..00d608269b1 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs @@ -37,8 +37,6 @@ mod diagnostics; mod syntax_tree; mod folding_ranges; -mod line_index; -mod line_index_utils; mod join_lines; mod typing; mod matching_brace; @@ -75,9 +73,11 @@ feature_flags::FeatureFlags, folding_ranges::{Fold, FoldKind}, hover::HoverResult, + ide_db::{ + line_index::{LineCol, LineIndex}, + line_index_utils::translate_offset_with_edit, + }, inlay_hints::{InlayHint, InlayKind}, - line_index::{LineCol, LineIndex}, - line_index_utils::translate_offset_with_edit, references::{ Declaration, Reference, ReferenceAccess, ReferenceKind, ReferenceSearchResult, SearchScope, },