From 3bd47c0285433b5eb258196a81b95141d2a70505 Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Fri, 25 Jan 2019 21:16:02 +0100 Subject: First attempt at generic type inference for fns --- crates/ra_hir/src/code_model_impl/function.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir/src/code_model_impl') diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index e0dd4d629..b4aa18540 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs @@ -32,7 +32,7 @@ impl FnSignature { .name() .map(|n| n.as_name()) .unwrap_or_else(Name::missing); - let mut params = Vec::new(); + let mut args = Vec::new(); let mut has_self_param = false; if let Some(param_list) = node.param_list() { if let Some(self_param) = param_list.self_param() { @@ -50,12 +50,12 @@ impl FnSignature { } } }; - params.push(self_type); + args.push(self_type); has_self_param = true; } for param in param_list.params() { let type_ref = TypeRef::from_ast_opt(param.type_ref()); - params.push(type_ref); + args.push(type_ref); } } let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) { @@ -66,7 +66,7 @@ impl FnSignature { let sig = FnSignature { name, - params, + args, ret_type, has_self_param, }; -- cgit v1.2.3