mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 21:43:37 +00:00
internal: Make TryToNav trait public
Currently there is no proper way to get a target FileRange for a given Definition.
This commit is contained in:
parent
d410d4a2ba
commit
231f730e87
2 changed files with 3 additions and 3 deletions
|
@ -79,7 +79,7 @@ use syntax::SourceFile;
|
||||||
use triomphe::Arc;
|
use triomphe::Arc;
|
||||||
use view_memory_layout::{view_memory_layout, RecursiveMemoryLayout};
|
use view_memory_layout::{view_memory_layout, RecursiveMemoryLayout};
|
||||||
|
|
||||||
use crate::navigation_target::{ToNav, TryToNav};
|
use crate::navigation_target::ToNav;
|
||||||
|
|
||||||
pub use crate::{
|
pub use crate::{
|
||||||
annotations::{Annotation, AnnotationConfig, AnnotationKind, AnnotationLocation},
|
annotations::{Annotation, AnnotationConfig, AnnotationKind, AnnotationLocation},
|
||||||
|
@ -104,7 +104,7 @@ pub use crate::{
|
||||||
SymbolInformationKind,
|
SymbolInformationKind,
|
||||||
},
|
},
|
||||||
move_item::Direction,
|
move_item::Direction,
|
||||||
navigation_target::{NavigationTarget, UpmappingResult},
|
navigation_target::{NavigationTarget, TryToNav, UpmappingResult},
|
||||||
prime_caches::ParallelPrimeCachesProgress,
|
prime_caches::ParallelPrimeCachesProgress,
|
||||||
references::ReferenceSearchResult,
|
references::ReferenceSearchResult,
|
||||||
rename::RenameError,
|
rename::RenameError,
|
||||||
|
|
|
@ -76,7 +76,7 @@ pub(crate) trait ToNav {
|
||||||
fn to_nav(&self, db: &RootDatabase) -> UpmappingResult<NavigationTarget>;
|
fn to_nav(&self, db: &RootDatabase) -> UpmappingResult<NavigationTarget>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) trait TryToNav {
|
pub trait TryToNav {
|
||||||
fn try_to_nav(&self, db: &RootDatabase) -> Option<UpmappingResult<NavigationTarget>>;
|
fn try_to_nav(&self, db: &RootDatabase) -> Option<UpmappingResult<NavigationTarget>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue