aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-07-15 20:47:45 +0100
committerFlorian Diebold <[email protected]>2020-07-15 21:07:13 +0100
commit20770044631fd0c21caa12f9bc87489ea6c848ee (patch)
tree27ba12638469c763874fa094744ffe3f628a7164 /crates/ra_hir_ty/src/lib.rs
parenta48843a16a2306399f2f6a78c69d9192a6480c88 (diff)
Remove TypeCtor interning
Our TypeCtor and Chalk's TypeName match now!
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r--crates/ra_hir_ty/src/lib.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index c4c24a83b..9f034eca5 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -112,6 +112,7 @@ pub enum TypeCtor {
112 /// fn foo() -> i32 { 1 } 112 /// fn foo() -> i32 { 1 }
113 /// let bar: fn() -> i32 = foo; 113 /// let bar: fn() -> i32 = foo;
114 /// ``` 114 /// ```
115 // FIXME make this a Ty variant like in Chalk
115 FnPtr { num_args: u16, is_varargs: bool }, 116 FnPtr { num_args: u16, is_varargs: bool },
116 117
117 /// The never type `!`. 118 /// The never type `!`.
@@ -139,13 +140,6 @@ pub enum TypeCtor {
139 Closure { def: DefWithBodyId, expr: ExprId }, 140 Closure { def: DefWithBodyId, expr: ExprId },
140} 141}
141 142
142/// This exists just for Chalk, because Chalk just has a single `StructId` where
143/// we have different kinds of ADTs, primitive types and special type
144/// constructors like tuples and function pointers.
145#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)]
146pub struct TypeCtorId(salsa::InternId);
147impl_intern_key!(TypeCtorId);
148
149/// This exists just for Chalk, because Chalk just has a single `FnDefId` where 143/// This exists just for Chalk, because Chalk just has a single `FnDefId` where
150/// we have different IDs for struct and enum variant constructors. 144/// we have different IDs for struct and enum variant constructors.
151#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)] 145#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)]