diff options
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function.rs | 14 | ||||
-rw-r--r-- | crates/ra_hir/src/code_model_impl/function/scope.rs | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model_impl/function.rs b/crates/ra_hir/src/code_model_impl/function.rs index 77dddff79..8d6b7fc19 100644 --- a/crates/ra_hir/src/code_model_impl/function.rs +++ b/crates/ra_hir/src/code_model_impl/function.rs | |||
@@ -42,8 +42,8 @@ impl FnSignature { | |||
42 | .name() | 42 | .name() |
43 | .map(|n| n.as_name()) | 43 | .map(|n| n.as_name()) |
44 | .unwrap_or_else(Name::missing); | 44 | .unwrap_or_else(Name::missing); |
45 | let mut args = Vec::new(); | 45 | let mut params = Vec::new(); |
46 | let mut has_self_arg = false; | 46 | let mut has_self_param = false; |
47 | if let Some(param_list) = node.param_list() { | 47 | if let Some(param_list) = node.param_list() { |
48 | if let Some(self_param) = param_list.self_param() { | 48 | if let Some(self_param) = param_list.self_param() { |
49 | let self_type = if let Some(type_ref) = self_param.type_ref() { | 49 | let self_type = if let Some(type_ref) = self_param.type_ref() { |
@@ -60,12 +60,12 @@ impl FnSignature { | |||
60 | } | 60 | } |
61 | } | 61 | } |
62 | }; | 62 | }; |
63 | args.push(self_type); | 63 | params.push(self_type); |
64 | has_self_arg = true; | 64 | has_self_param = true; |
65 | } | 65 | } |
66 | for param in param_list.params() { | 66 | for param in param_list.params() { |
67 | let type_ref = TypeRef::from_ast_opt(param.type_ref()); | 67 | let type_ref = TypeRef::from_ast_opt(param.type_ref()); |
68 | args.push(type_ref); | 68 | params.push(type_ref); |
69 | } | 69 | } |
70 | } | 70 | } |
71 | let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) { | 71 | let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) { |
@@ -75,9 +75,9 @@ impl FnSignature { | |||
75 | }; | 75 | }; |
76 | let sig = FnSignature { | 76 | let sig = FnSignature { |
77 | name, | 77 | name, |
78 | args, | 78 | params, |
79 | ret_type, | 79 | ret_type, |
80 | has_self_arg, | 80 | has_self_param, |
81 | }; | 81 | }; |
82 | Arc::new(sig) | 82 | Arc::new(sig) |
83 | } | 83 | } |
diff --git a/crates/ra_hir/src/code_model_impl/function/scope.rs b/crates/ra_hir/src/code_model_impl/function/scope.rs index ebf6edc1b..7d938c0dd 100644 --- a/crates/ra_hir/src/code_model_impl/function/scope.rs +++ b/crates/ra_hir/src/code_model_impl/function/scope.rs | |||
@@ -43,7 +43,7 @@ impl FnScopes { | |||
43 | scope_for: FxHashMap::default(), | 43 | scope_for: FxHashMap::default(), |
44 | }; | 44 | }; |
45 | let root = scopes.root_scope(); | 45 | let root = scopes.root_scope(); |
46 | scopes.add_params_bindings(root, body.args()); | 46 | scopes.add_params_bindings(root, body.params()); |
47 | compute_expr_scopes(body.body_expr(), &body, &mut scopes, root); | 47 | compute_expr_scopes(body.body_expr(), &body, &mut scopes, root); |
48 | scopes | 48 | scopes |
49 | } | 49 | } |