From a5ae8b8b92748e1b876002799d160136a7836212 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 16 Jul 2020 21:51:44 +0200 Subject: Inlay hints use callables --- crates/ra_hir/src/code_model.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index eb6a14eda..6cbcc3850 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -1552,6 +1552,9 @@ impl Callable { let param_list = src.value.param_list()?; param_list.self_param() } + pub fn n_params(&self) -> usize { + self.sig.params().len() + } pub fn params( &self, db: &dyn HirDatabase, -- cgit v1.2.3 From 3823c2dc1995ec261e36435662b8802c714e23d4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 16 Jul 2020 22:05:43 +0200 Subject: Remove FunctionSignature --- crates/ra_hir/src/code_model.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 6cbcc3850..0f6953158 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -1553,7 +1553,7 @@ impl Callable { param_list.self_param() } pub fn n_params(&self) -> usize { - self.sig.params().len() + self.sig.params().len() - if self.is_bound_method { 1 } else { 0 } } pub fn params( &self, -- cgit v1.2.3