mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
feat: respect references.exclude_tests in call-hierarchy
This commit is contained in:
parent
d7628c0a8b
commit
b7ed8150a3
6 changed files with 141 additions and 20 deletions
|
@ -79,7 +79,7 @@ use crate::navigation_target::ToNav;
|
|||
|
||||
pub use crate::{
|
||||
annotations::{Annotation, AnnotationConfig, AnnotationKind, AnnotationLocation},
|
||||
call_hierarchy::CallItem,
|
||||
call_hierarchy::{CallHierarchyConfig, CallItem},
|
||||
expand_macro::ExpandedMacro,
|
||||
file_structure::{StructureNode, StructureNodeKind},
|
||||
folding_ranges::{Fold, FoldKind},
|
||||
|
@ -564,13 +564,21 @@ impl Analysis {
|
|||
}
|
||||
|
||||
/// Computes incoming calls for the given file position.
|
||||
pub fn incoming_calls(&self, position: FilePosition) -> Cancellable<Option<Vec<CallItem>>> {
|
||||
self.with_db(|db| call_hierarchy::incoming_calls(db, position))
|
||||
pub fn incoming_calls(
|
||||
&self,
|
||||
config: CallHierarchyConfig,
|
||||
position: FilePosition,
|
||||
) -> Cancellable<Option<Vec<CallItem>>> {
|
||||
self.with_db(|db| call_hierarchy::incoming_calls(db, config, position))
|
||||
}
|
||||
|
||||
/// Computes outgoing calls for the given file position.
|
||||
pub fn outgoing_calls(&self, position: FilePosition) -> Cancellable<Option<Vec<CallItem>>> {
|
||||
self.with_db(|db| call_hierarchy::outgoing_calls(db, position))
|
||||
pub fn outgoing_calls(
|
||||
&self,
|
||||
config: CallHierarchyConfig,
|
||||
position: FilePosition,
|
||||
) -> Cancellable<Option<Vec<CallItem>>> {
|
||||
self.with_db(|db| call_hierarchy::outgoing_calls(db, config, position))
|
||||
}
|
||||
|
||||
/// Returns a `mod name;` declaration which created the current module.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue