diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_ide_api/src/folding_ranges.rs (renamed from crates/ra_ide_api_light/src/folding_ranges.rs) | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 6 | ||||
-rw-r--r-- | crates/ra_ide_api_light/src/lib.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api_light/src/folding_ranges.rs b/crates/ra_ide_api/src/folding_ranges.rs index 357a7dee1..b96145f05 100644 --- a/crates/ra_ide_api_light/src/folding_ranges.rs +++ b/crates/ra_ide_api/src/folding_ranges.rs | |||
@@ -20,7 +20,7 @@ pub struct Fold { | |||
20 | pub kind: FoldKind, | 20 | pub kind: FoldKind, |
21 | } | 21 | } |
22 | 22 | ||
23 | pub fn folding_ranges(file: &SourceFile) -> Vec<Fold> { | 23 | pub(crate) fn folding_ranges(file: &SourceFile) -> Vec<Fold> { |
24 | let mut res = vec![]; | 24 | let mut res = vec![]; |
25 | let mut visited_comments = FxHashSet::default(); | 25 | let mut visited_comments = FxHashSet::default(); |
26 | let mut visited_imports = FxHashSet::default(); | 26 | let mut visited_imports = FxHashSet::default(); |
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 35f38fbb7..d6f63490d 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -34,6 +34,7 @@ mod assists; | |||
34 | mod diagnostics; | 34 | mod diagnostics; |
35 | mod syntax_tree; | 35 | mod syntax_tree; |
36 | mod line_index; | 36 | mod line_index; |
37 | mod folding_ranges; | ||
37 | mod line_index_utils; | 38 | mod line_index_utils; |
38 | 39 | ||
39 | #[cfg(test)] | 40 | #[cfg(test)] |
@@ -64,9 +65,10 @@ pub use crate::{ | |||
64 | hover::{HoverResult}, | 65 | hover::{HoverResult}, |
65 | line_index::{LineIndex, LineCol}, | 66 | line_index::{LineIndex, LineCol}, |
66 | line_index_utils::translate_offset_with_edit, | 67 | line_index_utils::translate_offset_with_edit, |
68 | folding_ranges::{Fold, FoldKind}, | ||
67 | }; | 69 | }; |
68 | pub use ra_ide_api_light::{ | 70 | pub use ra_ide_api_light::{ |
69 | Fold, FoldKind, HighlightedRange, Severity, StructureNode, LocalEdit, | 71 | HighlightedRange, Severity, StructureNode, LocalEdit, |
70 | }; | 72 | }; |
71 | pub use ra_db::{ | 73 | pub use ra_db::{ |
72 | Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId, | 74 | Canceled, CrateGraph, CrateId, FileId, FilePosition, FileRange, SourceRootId, |
@@ -314,7 +316,7 @@ impl Analysis { | |||
314 | /// Returns the set of folding ranges. | 316 | /// Returns the set of folding ranges. |
315 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { | 317 | pub fn folding_ranges(&self, file_id: FileId) -> Vec<Fold> { |
316 | let file = self.db.parse(file_id); | 318 | let file = self.db.parse(file_id); |
317 | ra_ide_api_light::folding_ranges(&file) | 319 | folding_ranges::folding_ranges(&file) |
318 | } | 320 | } |
319 | 321 | ||
320 | /// Fuzzy searches for a symbol. | 322 | /// Fuzzy searches for a symbol. |
diff --git a/crates/ra_ide_api_light/src/lib.rs b/crates/ra_ide_api_light/src/lib.rs index 556d44c25..4036a598e 100644 --- a/crates/ra_ide_api_light/src/lib.rs +++ b/crates/ra_ide_api_light/src/lib.rs | |||
@@ -3,7 +3,6 @@ | |||
3 | //! This usually means functions which take syntax tree as an input and produce | 3 | //! This usually means functions which take syntax tree as an input and produce |
4 | //! an edit or some auxiliary info. | 4 | //! an edit or some auxiliary info. |
5 | 5 | ||
6 | mod folding_ranges; | ||
7 | mod structure; | 6 | mod structure; |
8 | #[cfg(test)] | 7 | #[cfg(test)] |
9 | mod test_utils; | 8 | mod test_utils; |
@@ -20,7 +19,6 @@ use ra_syntax::{ | |||
20 | }; | 19 | }; |
21 | 20 | ||
22 | pub use crate::{ | 21 | pub use crate::{ |
23 | folding_ranges::{folding_ranges, Fold, FoldKind}, | ||
24 | structure::{file_structure, StructureNode}, | 22 | structure::{file_structure, StructureNode}, |
25 | join_lines::join_lines, | 23 | join_lines::join_lines, |
26 | typing::{on_enter, on_dot_typed, on_eq_typed}, | 24 | typing::{on_enter, on_dot_typed, on_eq_typed}, |