diff options
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r-- | crates/hir_def/src/data.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/item_tree.rs | 2 | ||||
-rw-r--r-- | crates/hir_def/src/item_tree/lower.rs | 14 |
3 files changed, 0 insertions, 18 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs index 733db2eac..ff1ef0df6 100644 --- a/crates/hir_def/src/data.rs +++ b/crates/hir_def/src/data.rs | |||
@@ -19,7 +19,6 @@ use crate::{ | |||
19 | #[derive(Debug, Clone, PartialEq, Eq)] | 19 | #[derive(Debug, Clone, PartialEq, Eq)] |
20 | pub struct FunctionData { | 20 | pub struct FunctionData { |
21 | pub name: Name, | 21 | pub name: Name, |
22 | pub param_names: Vec<Option<Name>>, | ||
23 | pub params: Vec<TypeRef>, | 22 | pub params: Vec<TypeRef>, |
24 | pub ret_type: TypeRef, | 23 | pub ret_type: TypeRef, |
25 | pub attrs: Attrs, | 24 | pub attrs: Attrs, |
@@ -40,7 +39,6 @@ impl FunctionData { | |||
40 | 39 | ||
41 | Arc::new(FunctionData { | 40 | Arc::new(FunctionData { |
42 | name: func.name.clone(), | 41 | name: func.name.clone(), |
43 | param_names: func.param_names.to_vec(), | ||
44 | params: func.params.to_vec(), | 42 | params: func.params.to_vec(), |
45 | ret_type: func.ret_type.clone(), | 43 | ret_type: func.ret_type.clone(), |
46 | attrs: item_tree.attrs(ModItem::from(loc.id.value).into()).clone(), | 44 | attrs: item_tree.attrs(ModItem::from(loc.id.value).into()).clone(), |
diff --git a/crates/hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs index ca502ce2b..8a1121bbd 100644 --- a/crates/hir_def/src/item_tree.rs +++ b/crates/hir_def/src/item_tree.rs | |||
@@ -507,8 +507,6 @@ pub struct Function { | |||
507 | pub has_self_param: bool, | 507 | pub has_self_param: bool, |
508 | pub has_body: bool, | 508 | pub has_body: bool, |
509 | pub is_unsafe: bool, | 509 | pub is_unsafe: bool, |
510 | /// List of function parameters names. Does not include `self`. | ||
511 | pub param_names: Box<[Option<Name>]>, | ||
512 | pub params: Box<[TypeRef]>, | 510 | pub params: Box<[TypeRef]>, |
513 | pub is_varargs: bool, | 511 | pub is_varargs: bool, |
514 | pub ret_type: TypeRef, | 512 | pub ret_type: TypeRef, |
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, |