diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/display.rs | 6 | ||||
-rw-r--r-- | crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap (renamed from crates/ra_ide_api/src/snapshots/tests__file_structure.snap) | 6 | ||||
-rw-r--r-- | crates/ra_ide_api/src/display/structure.rs (renamed from crates/ra_ide_api/src/structure.rs) | 0 | ||||
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_ide_api/src/display.rs b/crates/ra_ide_api/src/display.rs index f0c818933..7a1f40fcf 100644 --- a/crates/ra_ide_api/src/display.rs +++ b/crates/ra_ide_api/src/display.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | //! This module contains utilities for rendering turning things into something | 1 | //! This module contains utilities for turning SyntaxNodes and HIR types |
2 | //! that may be used to render in UI. | 2 | //! into things that may be used to render in a UI. |
3 | use super::*; | 3 | use super::*; |
4 | use std::fmt::{self, Display}; | 4 | use std::fmt::{self, Display}; |
5 | use join_to_string::join; | 5 | use join_to_string::join; |
@@ -8,8 +8,10 @@ use std::convert::From; | |||
8 | use hir::Docs; | 8 | use hir::Docs; |
9 | 9 | ||
10 | pub mod navigation_target; | 10 | pub mod navigation_target; |
11 | pub mod structure; | ||
11 | 12 | ||
12 | pub use navigation_target::NavigationTarget; | 13 | pub use navigation_target::NavigationTarget; |
14 | pub use structure::StructureNode; | ||
13 | 15 | ||
14 | pub(crate) fn function_label(node: &ast::FnDef) -> String { | 16 | pub(crate) fn function_label(node: &ast::FnDef) -> String { |
15 | FunctionSignature::from(node).to_string() | 17 | FunctionSignature::from(node).to_string() |
diff --git a/crates/ra_ide_api/src/snapshots/tests__file_structure.snap b/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap index 2efa8e22c..32dd99484 100644 --- a/crates/ra_ide_api/src/snapshots/tests__file_structure.snap +++ b/crates/ra_ide_api/src/display/snapshots/tests__file_structure.snap | |||
@@ -1,7 +1,7 @@ | |||
1 | --- | 1 | --- |
2 | created: "2019-02-05T22:03:50.763530100Z" | 2 | created: "2019-04-08T09:44:50.196004400Z" |
3 | creator: insta@0.6.1 | 3 | creator: insta@0.7.4 |
4 | source: crates/ra_ide_api/src/structure.rs | 4 | source: crates/ra_ide_api/src/display/structure.rs |
5 | expression: structure | 5 | expression: structure |
6 | --- | 6 | --- |
7 | [ | 7 | [ |
diff --git a/crates/ra_ide_api/src/structure.rs b/crates/ra_ide_api/src/display/structure.rs index ec2c9bbc6..ec2c9bbc6 100644 --- a/crates/ra_ide_api/src/structure.rs +++ b/crates/ra_ide_api/src/display/structure.rs | |||
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index d76012a8c..974820a69 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -33,7 +33,6 @@ mod folding_ranges; | |||
33 | mod line_index; | 33 | mod line_index; |
34 | mod line_index_utils; | 34 | mod line_index_utils; |
35 | mod join_lines; | 35 | mod join_lines; |
36 | mod structure; | ||
37 | mod typing; | 36 | mod typing; |
38 | mod matching_brace; | 37 | mod matching_brace; |
39 | mod display; | 38 | mod display; |
@@ -69,9 +68,8 @@ pub use crate::{ | |||
69 | line_index_utils::translate_offset_with_edit, | 68 | line_index_utils::translate_offset_with_edit, |
70 | folding_ranges::{Fold, FoldKind}, | 69 | folding_ranges::{Fold, FoldKind}, |
71 | syntax_highlighting::HighlightedRange, | 70 | syntax_highlighting::HighlightedRange, |
72 | structure::{StructureNode, file_structure}, | ||
73 | diagnostics::Severity, | 71 | diagnostics::Severity, |
74 | display::{FunctionSignature, NavigationTarget}, | 72 | display::{FunctionSignature, NavigationTarget, structure::{StructureNode, file_structure}}, |
75 | }; | 73 | }; |
76 | 74 | ||
77 | pub use ra_db::{ | 75 | pub use ra_db::{ |
@@ -385,7 +383,7 @@ impl Analysis { | |||
385 | /// file outline. | 383 | /// file outline. |
386 | pub fn file_structure(&self, file_id: FileId) -> Vec<StructureNode> { | 384 | pub fn file_structure(&self, file_id: FileId) -> Vec<StructureNode> { |
387 | let file = self.db.parse(file_id); | 385 | let file = self.db.parse(file_id); |
388 | structure::file_structure(&file) | 386 | file_structure(&file) |
389 | } | 387 | } |
390 | 388 | ||
391 | /// Returns the set of folding ranges. | 389 | /// Returns the set of folding ranges. |