mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Introduce ActiveParameter
This commit is contained in:
parent
4b8e9d5483
commit
09a4b78775
5 changed files with 35 additions and 30 deletions
|
@ -129,21 +129,6 @@ pub struct CallInfo {
|
|||
pub active_parameter: Option<usize>,
|
||||
}
|
||||
|
||||
impl CallInfo {
|
||||
pub fn active_parameter_type(&self) -> Option<String> {
|
||||
if let Some(id) = self.active_parameter {
|
||||
return self.signature.parameter_types.get(id).map(|param_ty| param_ty.clone());
|
||||
}
|
||||
None
|
||||
}
|
||||
pub fn active_parameter_name(&self) -> Option<String> {
|
||||
if let Some(id) = self.active_parameter {
|
||||
return self.signature.parameter_names.get(id).map(|param_ty| param_ty.clone());
|
||||
}
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
/// `AnalysisHost` stores the current state of the world.
|
||||
#[derive(Debug)]
|
||||
pub struct AnalysisHost {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue