args -> params

This commit is contained in:
Florian Diebold
2019-01-12 21:58:16 +01:00
parent 5db5f5cc1d
commit 1ed7fbfc1b
8 changed files with 37 additions and 37 deletions

View File

@@ -42,8 +42,8 @@ impl FnSignature {
.name()
.map(|n| n.as_name())
.unwrap_or_else(Name::missing);
let mut args = Vec::new();
let mut has_self_arg = false;
let mut params = 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() {
let self_type = if let Some(type_ref) = self_param.type_ref() {
@@ -60,12 +60,12 @@ impl FnSignature {
}
}
};
args.push(self_type);
has_self_arg = true;
params.push(self_type);
has_self_param = true;
}
for param in param_list.params() {
let type_ref = TypeRef::from_ast_opt(param.type_ref());
args.push(type_ref);
params.push(type_ref);
}
}
let ret_type = if let Some(type_ref) = node.ret_type().and_then(|rt| rt.type_ref()) {
@@ -75,9 +75,9 @@ impl FnSignature {
};
let sig = FnSignature {
name,
args,
params,
ret_type,
has_self_arg,
has_self_param,
};
Arc::new(sig)
}

View File

@@ -43,7 +43,7 @@ impl FnScopes {
scope_for: FxHashMap::default(),
};
let root = scopes.root_scope();
scopes.add_params_bindings(root, body.args());
scopes.add_params_bindings(root, body.params());
compute_expr_scopes(body.body_expr(), &body, &mut scopes, root);
scopes
}