diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-05 18:25:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-05 18:25:19 +0100 |
commit | c91b5376835ab54cd4bca02953625ef1f1fabeba (patch) | |
tree | 390be0ec3c0a57db5188b06c86f0a7df0242b01c /crates/hir/src/source_analyzer.rs | |
parent | 467a5c6cd13af6ccb76e9ebdb35f96fc10fb438f (diff) | |
parent | a316d583600e11ee1fcc8027a838efafe435f03c (diff) |
Merge #8348
8348: Make `Binders` more like Chalk r=flodiebold a=flodiebold
Working towards #8313.
- hide `value`
- use `VariableKinds`
- adjust `subst` to be like Chalk's `substitute`
- also clean up some other `TypeWalk` stuff to prepare for it being replaced by Chalk's `Fold`
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir/src/source_analyzer.rs')
-rw-r--r-- | crates/hir/src/source_analyzer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs index 8e9ea0a03..4ce1c2080 100644 --- a/crates/hir/src/source_analyzer.rs +++ b/crates/hir/src/source_analyzer.rs | |||
@@ -20,7 +20,7 @@ use hir_def::{ | |||
20 | use hir_expand::{hygiene::Hygiene, name::AsName, HirFileId, InFile}; | 20 | use hir_expand::{hygiene::Hygiene, name::AsName, HirFileId, InFile}; |
21 | use hir_ty::{ | 21 | use hir_ty::{ |
22 | diagnostics::{record_literal_missing_fields, record_pattern_missing_fields}, | 22 | diagnostics::{record_literal_missing_fields, record_pattern_missing_fields}, |
23 | InferenceResult, Substitution, TyLoweringContext, | 23 | InferenceResult, Interner, Substitution, TyLoweringContext, |
24 | }; | 24 | }; |
25 | use syntax::{ | 25 | use syntax::{ |
26 | ast::{self, AstNode}, | 26 | ast::{self, AstNode}, |
@@ -339,7 +339,7 @@ impl SourceAnalyzer { | |||
339 | .into_iter() | 339 | .into_iter() |
340 | .map(|local_id| { | 340 | .map(|local_id| { |
341 | let field = FieldId { parent: variant, local_id }; | 341 | let field = FieldId { parent: variant, local_id }; |
342 | let ty = field_types[local_id].clone().subst(substs); | 342 | let ty = field_types[local_id].clone().substitute(&Interner, substs); |
343 | (field.into(), Type::new_with_resolver_inner(db, krate, &self.resolver, ty)) | 343 | (field.into(), Type::new_with_resolver_inner(db, krate, &self.resolver, ty)) |
344 | }) | 344 | }) |
345 | .collect() | 345 | .collect() |