aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-02-14 13:44:00 +0000
committerFlorian Diebold <[email protected]>2020-02-14 13:44:00 +0000
commita324d066cb767876f9f3398f83db9f5a8dda8ce4 (patch)
treee2b6b33ebf9445140549ae4f7f0b81dcc6a0855f /crates/ra_hir_ty/src/lib.rs
parenta19f52f9ae1634fa2267c3bc7647a0d47b6014ac (diff)
Rename Ty::Param => Ty::Placeholder
This aligns more with Chalk.
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r--crates/ra_hir_ty/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index c5fe18c85..69ad13952 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -291,7 +291,7 @@ pub enum Ty {
291 /// {}` when we're type-checking the body of that function. In this 291 /// {}` when we're type-checking the body of that function. In this
292 /// situation, we know this stands for *some* type, but don't know the exact 292 /// situation, we know this stands for *some* type, but don't know the exact
293 /// type. 293 /// type.
294 Param(TypeParamId), 294 Placeholder(TypeParamId),
295 295
296 /// A bound type variable. This is used in various places: when representing 296 /// A bound type variable. This is used in various places: when representing
297 /// some polymorphic type like the type of function `fn f<T>`, the type 297 /// some polymorphic type like the type of function `fn f<T>`, the type
@@ -365,7 +365,7 @@ impl Substs {
365 365
366 /// Return Substs that replace each parameter by itself (i.e. `Ty::Param`). 366 /// Return Substs that replace each parameter by itself (i.e. `Ty::Param`).
367 pub(crate) fn type_params_for_generics(generic_params: &Generics) -> Substs { 367 pub(crate) fn type_params_for_generics(generic_params: &Generics) -> Substs {
368 Substs(generic_params.iter().map(|(id, _)| Ty::Param(id)).collect()) 368 Substs(generic_params.iter().map(|(id, _)| Ty::Placeholder(id)).collect())
369 } 369 }
370 370
371 /// Return Substs that replace each parameter by itself (i.e. `Ty::Param`). 371 /// Return Substs that replace each parameter by itself (i.e. `Ty::Param`).
@@ -813,7 +813,7 @@ impl TypeWalk for Ty {
813 p.walk(f); 813 p.walk(f);
814 } 814 }
815 } 815 }
816 Ty::Param { .. } | Ty::Bound(_) | Ty::Infer(_) | Ty::Unknown => {} 816 Ty::Placeholder { .. } | Ty::Bound(_) | Ty::Infer(_) | Ty::Unknown => {}
817 } 817 }
818 f(self); 818 f(self);
819 } 819 }
@@ -831,7 +831,7 @@ impl TypeWalk for Ty {
831 p.walk_mut_binders(f, binders + 1); 831 p.walk_mut_binders(f, binders + 1);
832 } 832 }
833 } 833 }
834 Ty::Param { .. } | Ty::Bound(_) | Ty::Infer(_) | Ty::Unknown => {} 834 Ty::Placeholder { .. } | Ty::Bound(_) | Ty::Infer(_) | Ty::Unknown => {}
835 } 835 }
836 f(self, binders); 836 f(self, binders);
837 } 837 }
@@ -1032,7 +1032,7 @@ impl HirDisplay for Ty {
1032 match self { 1032 match self {
1033 Ty::Apply(a_ty) => a_ty.hir_fmt(f)?, 1033 Ty::Apply(a_ty) => a_ty.hir_fmt(f)?,
1034 Ty::Projection(p_ty) => p_ty.hir_fmt(f)?, 1034 Ty::Projection(p_ty) => p_ty.hir_fmt(f)?,
1035 Ty::Param(id) => { 1035 Ty::Placeholder(id) => {
1036 let generics = generics(f.db, id.parent); 1036 let generics = generics(f.db, id.parent);
1037 let param_data = &generics.params.types[id.local_id]; 1037 let param_data = &generics.params.types[id.local_id];
1038 match param_data.provenance { 1038 match param_data.provenance {