aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/display.rs6
-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.rs6
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.
3use super::*; 3use super::*;
4use std::fmt::{self, Display}; 4use std::fmt::{self, Display};
5use join_to_string::join; 5use join_to_string::join;
@@ -8,8 +8,10 @@ use std::convert::From;
8use hir::Docs; 8use hir::Docs;
9 9
10pub mod navigation_target; 10pub mod navigation_target;
11pub mod structure;
11 12
12pub use navigation_target::NavigationTarget; 13pub use navigation_target::NavigationTarget;
14pub use structure::StructureNode;
13 15
14pub(crate) fn function_label(node: &ast::FnDef) -> String { 16pub(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---
2created: "2019-02-05T22:03:50.763530100Z" 2created: "2019-04-08T09:44:50.196004400Z"
3creator: insta@0.6.1 3creator: insta@0.7.4
4source: crates/ra_ide_api/src/structure.rs 4source: crates/ra_ide_api/src/display/structure.rs
5expression: structure 5expression: 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;
33mod line_index; 33mod line_index;
34mod line_index_utils; 34mod line_index_utils;
35mod join_lines; 35mod join_lines;
36mod structure;
37mod typing; 36mod typing;
38mod matching_brace; 37mod matching_brace;
39mod display; 38mod 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
77pub use ra_db::{ 75pub 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.