Add Interner parameter to Binders::substitute

This commit is contained in:
Florian Diebold 2021-04-05 18:49:26 +02:00
parent 05eba0db3d
commit 30a339e038
14 changed files with 52 additions and 43 deletions

View file

@ -20,7 +20,7 @@ use hir_def::{
use hir_expand::{hygiene::Hygiene, name::AsName, HirFileId, InFile};
use hir_ty::{
diagnostics::{record_literal_missing_fields, record_pattern_missing_fields},
InferenceResult, Substitution, TyLoweringContext,
InferenceResult, Interner, Substitution, TyLoweringContext,
};
use syntax::{
ast::{self, AstNode},
@ -339,7 +339,7 @@ impl SourceAnalyzer {
.into_iter()
.map(|local_id| {
let field = FieldId { parent: variant, local_id };
let ty = field_types[local_id].clone().substitute(substs);
let ty = field_types[local_id].clone().substitute(&Interner, substs);
(field.into(), Type::new_with_resolver_inner(db, krate, &self.resolver, ty))
})
.collect()