aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-03-01 13:24:00 +0000
committerLukas Wirth <[email protected]>2021-03-01 13:24:00 +0000
commit5d121cdb45f5199828ed64a2ca01a74998e023ad (patch)
treeb2a941497dea3cc38adb6c55049668aa31b2554b /crates/hir/src
parentcda13d54613006c7985da0489878605300ba05b8 (diff)
Introduce Ty::Alias
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/code_model.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 351ba75ff..00b0dc082 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -31,7 +31,7 @@ use hir_ty::{
31 display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter}, 31 display::{write_bounds_like_dyn_trait_with_prefix, HirDisplayError, HirFormatter},
32 method_resolution, 32 method_resolution,
33 traits::{FnTrait, Solution, SolutionVariables}, 33 traits::{FnTrait, Solution, SolutionVariables},
34 BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate, 34 AliasTy, BoundVar, CallableDefId, CallableSig, Canonical, DebruijnIndex, GenericPredicate,
35 InEnvironment, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substs, TraitEnvironment, 35 InEnvironment, Obligation, ProjectionPredicate, ProjectionTy, Scalar, Substs, TraitEnvironment,
36 Ty, TyDefId, TyVariableKind, 36 Ty, TyDefId, TyVariableKind,
37}; 37};
@@ -1648,7 +1648,7 @@ impl Type {
1648 .build(); 1648 .build();
1649 let predicate = ProjectionPredicate { 1649 let predicate = ProjectionPredicate {
1650 projection_ty: ProjectionTy { associated_ty: alias.id, parameters: subst }, 1650 projection_ty: ProjectionTy { associated_ty: alias.id, parameters: subst },
1651 ty: Ty::Bound(BoundVar::new(DebruijnIndex::INNERMOST, 0)), 1651 ty: Ty::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, 0)),
1652 }; 1652 };
1653 let goal = Canonical { 1653 let goal = Canonical {
1654 value: InEnvironment::new( 1654 value: InEnvironment::new(
@@ -1709,7 +1709,7 @@ impl Type {
1709 } 1709 }
1710 1710
1711 pub fn is_raw_ptr(&self) -> bool { 1711 pub fn is_raw_ptr(&self) -> bool {
1712 matches!(&self.ty.value, Ty::RawPtr(..)) 1712 matches!(&self.ty.value, Ty::Raw(..))
1713 } 1713 }
1714 1714
1715 pub fn contains_unknown(&self) -> bool { 1715 pub fn contains_unknown(&self) -> bool {
@@ -1937,7 +1937,7 @@ impl Type {
1937 walk_bounds(db, &type_.derived(ty.clone()), &bounds, cb); 1937 walk_bounds(db, &type_.derived(ty.clone()), &bounds, cb);
1938 } 1938 }
1939 } 1939 }
1940 Ty::Opaque(opaque_ty) => { 1940 Ty::Alias(AliasTy::Opaque(opaque_ty)) => {
1941 if let Some(bounds) = ty.impl_trait_bounds(db) { 1941 if let Some(bounds) = ty.impl_trait_bounds(db) {
1942 walk_bounds(db, &type_.derived(ty.clone()), &bounds, cb); 1942 walk_bounds(db, &type_.derived(ty.clone()), &bounds, cb);
1943 } 1943 }