mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
args -> params
This commit is contained in:
parent
5db5f5cc1d
commit
1ed7fbfc1b
8 changed files with 37 additions and 37 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue