diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-16 09:02:39 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-16 09:02:39 +0100 |
commit | 6a74a917133a98aac2a35df537b7112279dd7d71 (patch) | |
tree | 103618bb65397a0051a92b5fe00329e791ef1803 /crates/ra_hir_ty/src/lib.rs | |
parent | 6824cf4f8a94dc9d0bd049efcf99e18651c71831 (diff) | |
parent | 20770044631fd0c21caa12f9bc87489ea6c848ee (diff) |
Merge #5401
5401: Implement Chalk closure support r=matklad a=flodiebold
This makes use of Chalk's closure support, which means we can get rid of our last built-in impls and a bunch of other surrounding stuff.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty/src/lib.rs')
-rw-r--r-- | crates/ra_hir_ty/src/lib.rs | 8 |
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)] | ||
146 | pub struct TypeCtorId(salsa::InternId); | ||
147 | impl_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)] |