diff options
author | Igor Aleksanov <[email protected]> | 2020-10-04 05:42:06 +0100 |
---|---|---|
committer | Igor Aleksanov <[email protected]> | 2020-10-12 09:05:00 +0100 |
commit | cfbee8d3a35f81e710b17e48b8018cd6076a8133 (patch) | |
tree | 65f2ba69f98599ea5b499be14f1002b293172722 /crates/hir_def/src/item_tree | |
parent | b42562b5dee4f4ce23094c7bab6406e3b00f90ad (diff) |
Remove previously added parameter names from the function data
Diffstat (limited to 'crates/hir_def/src/item_tree')
-rw-r--r-- | crates/hir_def/src/item_tree/lower.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index 2ffa46ac0..3328639cf 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs | |||
@@ -283,7 +283,6 @@ impl Ctx { | |||
283 | let name = func.name()?.as_name(); | 283 | let name = func.name()?.as_name(); |
284 | 284 | ||
285 | let mut params = Vec::new(); | 285 | let mut params = Vec::new(); |
286 | let mut param_names = Vec::new(); | ||
287 | let mut has_self_param = false; | 286 | let mut has_self_param = false; |
288 | if let Some(param_list) = func.param_list() { | 287 | if let Some(param_list) = func.param_list() { |
289 | if let Some(self_param) = param_list.self_param() { | 288 | if let Some(self_param) = param_list.self_param() { |
@@ -306,18 +305,6 @@ impl Ctx { | |||
306 | has_self_param = true; | 305 | has_self_param = true; |
307 | } | 306 | } |
308 | for param in param_list.params() { | 307 | for param in param_list.params() { |
309 | let param_name = param | ||
310 | .pat() | ||
311 | .map(|name| { | ||
312 | if let ast::Pat::IdentPat(ident) = name { | ||
313 | Some(ident.name()?.as_name()) | ||
314 | } else { | ||
315 | None | ||
316 | } | ||
317 | }) | ||
318 | .flatten(); | ||
319 | param_names.push(param_name); | ||
320 | |||
321 | let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ty()); | 308 | let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ty()); |
322 | params.push(type_ref); | 309 | params.push(type_ref); |
323 | } | 310 | } |
@@ -354,7 +341,6 @@ impl Ctx { | |||
354 | has_body, | 341 | has_body, |
355 | is_unsafe: func.unsafe_token().is_some(), | 342 | is_unsafe: func.unsafe_token().is_some(), |
356 | params: params.into_boxed_slice(), | 343 | params: params.into_boxed_slice(), |
357 | param_names: param_names.into_boxed_slice(), | ||
358 | is_varargs, | 344 | is_varargs, |
359 | ret_type, | 345 | ret_type, |
360 | ast_id, | 346 | ast_id, |