Store GenericParams in arena

This commit is contained in:
Aleksey Kladov 2019-12-06 17:35:05 +01:00
parent 35fc983dd9
commit 30fefcc08c
4 changed files with 25 additions and 14 deletions

View file

@ -662,7 +662,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
let mut substs = Vec::with_capacity(parent_param_count + param_count);
// Parent arguments are unknown, except for the receiver type
if let Some(parent_generics) = def_generics.and_then(|p| p.parent_params.clone()) {
for param in &parent_generics.params {
for (_id, param) in parent_generics.params.iter() {
if param.name == name::SELF_TYPE {
substs.push(receiver_ty.clone());
} else {