mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Differentiate Tuple / FnPtr type constructors by cardinality
This is necessary because Chalk (reasonably) expects each 'struct' to know how many type parameters it takes.
This commit is contained in:
parent
19fbd91998
commit
a4eb1a546c
5 changed files with 25 additions and 15 deletions
|
@ -24,7 +24,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
|
|||
}
|
||||
}
|
||||
// FIXME unions
|
||||
TypeCtor::Tuple => {
|
||||
TypeCtor::Tuple { .. } => {
|
||||
for (i, ty) in a_ty.parameters.iter().enumerate() {
|
||||
acc.add_pos_field(ctx, i, ty);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue