aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-01 13:29:54 +0000
committerGitHub <[email protected]>2021-03-01 13:29:54 +0000
commit4a9eec44787a0f2b35467ea98dd6f596671907f9 (patch)
treeb2a941497dea3cc38adb6c55049668aa31b2554b /crates/hir
parentcda13d54613006c7985da0489878605300ba05b8 (diff)
parent5d121cdb45f5199828ed64a2ca01a74998e023ad (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')
-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 }