aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/display
diff options
context:
space:
mode:
authorTomasKralCZ <[email protected]>2020-01-19 16:51:03 +0000
committerTomasKralCZ <[email protected]>2020-01-19 16:51:03 +0000
commit514df15d9e32e057ba23dda0d4f5c07e82e7ed23 (patch)
tree41e93f63182bae10a7325fc50220f67df79aaece /crates/ra_ide/src/display
parentc3b9a19eb72ae9542272ae7a22ac3fb57c75daca (diff)
parent3a7724e44181ccd5c248589538bd82458b5a9407 (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_ide/src/display')
-rw-r--r--crates/ra_ide/src/display/function_signature.rs19
1 files changed, 16 insertions, 3 deletions
diff --git a/crates/ra_ide/src/display/function_signature.rs b/crates/ra_ide/src/display/function_signature.rs
index ddc53a52b..1e4a472b4 100644
--- a/crates/ra_ide/src/display/function_signature.rs
+++ b/crates/ra_ide/src/display/function_signature.rs
@@ -169,9 +169,22 @@ impl From<&'_ ast::FnDef> for FunctionSignature {
169 res.push(self_param.syntax().text().to_string()) 169 res.push(self_param.syntax().text().to_string())
170 } 170 }
171 171
172 res.extend(param_list.params().map(|param| { 172 res.extend(
173 param.pat().map(|pat| pat.syntax().text().to_string()).unwrap_or_default() 173 param_list
174 })); 174 .params()
175 .map(|param| {
176 Some(
177 param
178 .pat()?
179 .syntax()
180 .descendants()
181 .find_map(ast::Name::cast)?
182 .text()
183 .to_string(),
184 )
185 })
186 .map(|param| param.unwrap_or_default()),
187 );
175 } 188 }
176 res 189 res
177 } 190 }