mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +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
|
@ -99,13 +99,7 @@ impl HirDisplay for Function {
|
|||
}
|
||||
|
||||
// FIXME: Use resolved `param.ty` once we no longer discard lifetimes
|
||||
for (type_ref, param) in data
|
||||
.params
|
||||
.iter()
|
||||
.zip(self.assoc_fn_params(db))
|
||||
.take(data.params.len() - data.is_varargs() as usize)
|
||||
.skip(skip_self)
|
||||
{
|
||||
for (type_ref, param) in data.params.iter().zip(self.assoc_fn_params(db)).skip(skip_self) {
|
||||
let local = param.as_local(db).map(|it| it.name(db));
|
||||
if !first {
|
||||
f.write_str(", ")?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue