mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
Unnest ide::display::navigation_target module
This commit is contained in:
parent
806d7d725d
commit
54b2de45e1
@ -9,7 +9,7 @@ use ide_db::{
|
||||
};
|
||||
use syntax::{ast, AstNode, SyntaxKind::NAME, TextRange};
|
||||
|
||||
use crate::{display::TryToNav, goto_definition, FilePosition, NavigationTarget, RangeInfo};
|
||||
use crate::{goto_definition, FilePosition, NavigationTarget, RangeInfo, TryToNav};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CallItem {
|
||||
|
@ -1,5 +0,0 @@
|
||||
//! This module contains utilities for turning SyntaxNodes and HIR types
|
||||
//! into types that may be used to render in a UI.
|
||||
|
||||
pub(crate) mod navigation_target;
|
||||
pub(crate) use navigation_target::{ToNav, TryToNav};
|
@ -531,7 +531,7 @@ mod tests {
|
||||
use ide_db::base_db::FileRange;
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::{display::TryToNav, fixture};
|
||||
use crate::{fixture, TryToNav};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
use std::convert::TryInto;
|
||||
|
||||
use crate::{
|
||||
display::TryToNav, doc_links::token_as_doc_comment, FilePosition, NavigationTarget, RangeInfo,
|
||||
};
|
||||
use crate::{doc_links::token_as_doc_comment, FilePosition, NavigationTarget, RangeInfo, TryToNav};
|
||||
use hir::{AsAssocItem, Semantics};
|
||||
use ide_db::{
|
||||
base_db::{AnchoredPath, FileId, FileLoader},
|
||||
|
@ -7,7 +7,7 @@ use ide_db::{
|
||||
use itertools::Itertools;
|
||||
use syntax::{ast, AstNode, SyntaxKind::*, T};
|
||||
|
||||
use crate::{display::TryToNav, FilePosition, NavigationTarget, RangeInfo};
|
||||
use crate::{FilePosition, NavigationTarget, RangeInfo, TryToNav};
|
||||
|
||||
// Feature: Go to Implementation
|
||||
//
|
||||
|
@ -1,7 +1,7 @@
|
||||
use ide_db::{base_db::Upcast, defs::Definition, helpers::pick_best_token, RootDatabase};
|
||||
use syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxToken, T};
|
||||
|
||||
use crate::{display::TryToNav, FilePosition, NavigationTarget, RangeInfo};
|
||||
use crate::{FilePosition, NavigationTarget, RangeInfo, TryToNav};
|
||||
|
||||
// Feature: Go to Type Definition
|
||||
//
|
||||
|
@ -14,7 +14,7 @@ use syntax::{
|
||||
SyntaxNode, SyntaxToken, TextRange, T,
|
||||
};
|
||||
|
||||
use crate::{display::TryToNav, references, NavigationTarget};
|
||||
use crate::{references, NavigationTarget, TryToNav};
|
||||
|
||||
#[derive(PartialEq, Eq, Hash)]
|
||||
pub struct HighlightedRange {
|
||||
|
@ -17,11 +17,10 @@ use itertools::Itertools;
|
||||
use syntax::{ast, match_ast, AstNode, SyntaxKind::*, SyntaxNode, SyntaxToken, T};
|
||||
|
||||
use crate::{
|
||||
display::TryToNav,
|
||||
doc_links::token_as_doc_comment,
|
||||
markup::Markup,
|
||||
runnables::{runnable_fn, runnable_mod},
|
||||
FileId, FilePosition, NavigationTarget, RangeInfo, Runnable,
|
||||
FileId, FilePosition, NavigationTarget, RangeInfo, Runnable, TryToNav,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
|
@ -20,7 +20,7 @@ mod fixture;
|
||||
|
||||
mod markup;
|
||||
mod prime_caches;
|
||||
mod display;
|
||||
mod navigation_target;
|
||||
|
||||
mod annotations;
|
||||
mod call_hierarchy;
|
||||
@ -68,12 +68,11 @@ use ide_db::{
|
||||
};
|
||||
use syntax::SourceFile;
|
||||
|
||||
use crate::display::ToNav;
|
||||
use crate::navigation_target::{ToNav, TryToNav};
|
||||
|
||||
pub use crate::{
|
||||
annotations::{Annotation, AnnotationConfig, AnnotationKind},
|
||||
call_hierarchy::CallItem,
|
||||
display::navigation_target::NavigationTarget,
|
||||
expand_macro::ExpandedMacro,
|
||||
file_structure::{StructureNode, StructureNodeKind},
|
||||
folding_ranges::{Fold, FoldKind},
|
||||
@ -83,6 +82,7 @@ pub use crate::{
|
||||
join_lines::JoinLinesConfig,
|
||||
markup::Markup,
|
||||
move_item::Direction,
|
||||
navigation_target::NavigationTarget,
|
||||
prime_caches::PrimeCachesProgress,
|
||||
references::ReferenceSearchResult,
|
||||
rename::RenameError,
|
||||
|
@ -23,7 +23,7 @@ use syntax::{
|
||||
match_ast, AstNode, SyntaxNode, TextRange, TextSize, T,
|
||||
};
|
||||
|
||||
use crate::{display::TryToNav, FilePosition, NavigationTarget};
|
||||
use crate::{FilePosition, NavigationTarget, TryToNav};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ReferenceSearchResult {
|
||||
|
@ -19,10 +19,7 @@ use syntax::{
|
||||
SmolStr, SyntaxNode,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
display::{ToNav, TryToNav},
|
||||
references, FileId, NavigationTarget,
|
||||
};
|
||||
use crate::{references, FileId, NavigationTarget, ToNav, TryToNav};
|
||||
|
||||
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct Runnable {
|
||||
|
@ -12,10 +12,9 @@ use rustc_hash::FxHashSet;
|
||||
use syntax::{AstNode, SyntaxKind::*, T};
|
||||
use syntax::{SyntaxToken, TextRange};
|
||||
|
||||
use crate::display::TryToNav;
|
||||
use crate::hover::hover_for_definition;
|
||||
use crate::{
|
||||
Analysis, Fold, HoverConfig, HoverDocFormat, HoverResult, InlayHint, InlayHintsConfig,
|
||||
Analysis, Fold, HoverConfig, HoverDocFormat, HoverResult, InlayHint, InlayHintsConfig, TryToNav,
|
||||
};
|
||||
|
||||
/// A static representation of fully analyzed source code.
|
||||
|
Loading…
Reference in New Issue
Block a user