mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
insert dummy values for const generics in subst
This commit is contained in:
parent
4924072493
commit
1282178783
12 changed files with 176 additions and 62 deletions
|
@ -1032,10 +1032,10 @@ impl<'a> InferenceContext<'a> {
|
|||
def_generics: Generics,
|
||||
generic_args: Option<&GenericArgs>,
|
||||
) -> Substitution {
|
||||
let (parent_params, self_params, type_params, impl_trait_params) =
|
||||
let (parent_params, self_params, type_params, const_params, impl_trait_params) =
|
||||
def_generics.provenance_split();
|
||||
assert_eq!(self_params, 0); // method shouldn't have another Self param
|
||||
let total_len = parent_params + type_params + impl_trait_params;
|
||||
let total_len = parent_params + type_params + const_params + impl_trait_params;
|
||||
let mut substs = Vec::with_capacity(total_len);
|
||||
// Parent arguments are unknown
|
||||
for (_id, param) in def_generics.iter_parent() {
|
||||
|
@ -1044,7 +1044,8 @@ impl<'a> InferenceContext<'a> {
|
|||
substs.push(self.table.new_type_var());
|
||||
}
|
||||
TypeOrConstParamData::ConstParamData(_) => {
|
||||
// FIXME: here we should do something
|
||||
// FIXME: here we should do something else
|
||||
substs.push(self.table.new_type_var());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue