mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fix incorrect handling of cfg'd varargs
This commit is contained in:
parent
9cbafa2d49
commit
f2fa456a8c
8 changed files with 37 additions and 16 deletions
|
@ -380,7 +380,7 @@ impl<'a> Ctx<'a> {
|
|||
}
|
||||
};
|
||||
let type_ref = Interned::new(self_type);
|
||||
params.push(Param { type_ref });
|
||||
params.push(Param { type_ref: Some(type_ref) });
|
||||
has_self_param = true;
|
||||
}
|
||||
for param in param_list.params() {
|
||||
|
@ -388,12 +388,12 @@ impl<'a> Ctx<'a> {
|
|||
let param = match param.dotdotdot_token() {
|
||||
Some(_) => {
|
||||
has_var_args = true;
|
||||
Param { type_ref: Interned::new(TypeRef::Error) }
|
||||
Param { type_ref: None }
|
||||
}
|
||||
None => {
|
||||
let type_ref = TypeRef::from_ast_opt(&self.body_ctx, param.ty());
|
||||
let ty = Interned::new(type_ref);
|
||||
Param { type_ref: ty }
|
||||
Param { type_ref: Some(ty) }
|
||||
}
|
||||
};
|
||||
params.push(param);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue