mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Move structure to display/structure
This commit is contained in:
parent
027d4d229d
commit
7821c56be7
4 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
//! This module contains utilities for rendering turning things into something
|
||||
//! that may be used to render in UI.
|
||||
//! This module contains utilities for turning SyntaxNodes and HIR types
|
||||
//! into things that may be used to render in a UI.
|
||||
use super::*;
|
||||
use std::fmt::{self, Display};
|
||||
use join_to_string::join;
|
||||
|
@ -8,8 +8,10 @@ use std::convert::From;
|
|||
use hir::Docs;
|
||||
|
||||
pub mod navigation_target;
|
||||
pub mod structure;
|
||||
|
||||
pub use navigation_target::NavigationTarget;
|
||||
pub use structure::StructureNode;
|
||||
|
||||
pub(crate) fn function_label(node: &ast::FnDef) -> String {
|
||||
FunctionSignature::from(node).to_string()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
created: "2019-02-05T22:03:50.763530100Z"
|
||||
creator: insta@0.6.1
|
||||
source: crates/ra_ide_api/src/structure.rs
|
||||
created: "2019-04-08T09:44:50.196004400Z"
|
||||
creator: insta@0.7.4
|
||||
source: crates/ra_ide_api/src/display/structure.rs
|
||||
expression: structure
|
||||
---
|
||||
[
|
|
@ -33,7 +33,6 @@ mod folding_ranges;
|
|||
mod line_index;
|
||||
mod line_index_utils;
|
||||
mod join_lines;
|
||||
mod structure;
|
||||
mod typing;
|
||||
mod matching_brace;
|
||||
mod display;
|
||||
|
@ -69,9 +68,8 @@ pub use crate::{
|
|||
line_index_utils::translate_offset_with_edit,
|
||||
folding_ranges::{Fold, FoldKind},
|
||||
syntax_highlighting::HighlightedRange,
|
||||
structure::{StructureNode, file_structure},
|
||||
diagnostics::Severity,
|
||||
display::{FunctionSignature, NavigationTarget},
|
||||
display::{FunctionSignature, NavigationTarget, structure::{StructureNode, file_structure}},
|
||||
};
|
||||
|
||||
pub use ra_db::{
|
||||
|
@ -385,7 +383,7 @@ impl Analysis {
|
|||
/// file outline.
|
||||
pub fn file_structure(&self, file_id: FileId) -> Vec<StructureNode> {
|
||||
let file = self.db.parse(file_id);
|
||||
structure::file_structure(&file)
|
||||
file_structure(&file)
|
||||
}
|
||||
|
||||
/// Returns the set of folding ranges.
|
||||
|
|
Loading…
Reference in a new issue