diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-01 13:29:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-01 13:29:54 +0000 |
commit | 4a9eec44787a0f2b35467ea98dd6f596671907f9 (patch) | |
tree | b2a941497dea3cc38adb6c55049668aa31b2554b /crates/hir_ty/src/infer.rs | |
parent | cda13d54613006c7985da0489878605300ba05b8 (diff) | |
parent | 5d121cdb45f5199828ed64a2ca01a74998e023ad (diff) |
Merge #7826
7826: Introduce Ty::Alias r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r-- | crates/hir_ty/src/infer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs index 1d78d1feb..18a4f5e8a 100644 --- a/crates/hir_ty/src/infer.rs +++ b/crates/hir_ty/src/infer.rs | |||
@@ -40,7 +40,7 @@ use super::{ | |||
40 | InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, Ty, TypeWalk, | 40 | InEnvironment, ProjectionTy, Substs, TraitEnvironment, TraitRef, Ty, TypeWalk, |
41 | }; | 41 | }; |
42 | use crate::{ | 42 | use crate::{ |
43 | db::HirDatabase, infer::diagnostics::InferenceDiagnostic, lower::ImplTraitLoweringMode, | 43 | db::HirDatabase, infer::diagnostics::InferenceDiagnostic, lower::ImplTraitLoweringMode, AliasTy, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | pub(crate) use unify::unify; | 46 | pub(crate) use unify::unify; |
@@ -395,7 +395,7 @@ impl<'a> InferenceContext<'a> { | |||
395 | fn normalize_associated_types_in(&mut self, ty: Ty) -> Ty { | 395 | fn normalize_associated_types_in(&mut self, ty: Ty) -> Ty { |
396 | let ty = self.resolve_ty_as_possible(ty); | 396 | let ty = self.resolve_ty_as_possible(ty); |
397 | ty.fold(&mut |ty| match ty { | 397 | ty.fold(&mut |ty| match ty { |
398 | Ty::Projection(proj_ty) => self.normalize_projection_ty(proj_ty), | 398 | Ty::Alias(AliasTy::Projection(proj_ty)) => self.normalize_projection_ty(proj_ty), |
399 | _ => ty, | 399 | _ => ty, |
400 | }) | 400 | }) |
401 | } | 401 | } |