Remove TypeCtor interning

Our TypeCtor and Chalk's TypeName match now!
This commit is contained in:
Florian Diebold
2020-07-15 21:47:45 +02:00
parent a48843a16a
commit 2077004463
8 changed files with 28 additions and 38 deletions

View File

@@ -112,6 +112,7 @@ pub enum TypeCtor {
/// fn foo() -> i32 { 1 }
/// let bar: fn() -> i32 = foo;
/// ```
// FIXME make this a Ty variant like in Chalk
FnPtr { num_args: u16, is_varargs: bool },
/// The never type `!`.
@@ -139,13 +140,6 @@ pub enum TypeCtor {
Closure { def: DefWithBodyId, expr: ExprId },
}
/// This exists just for Chalk, because Chalk just has a single `StructId` where
/// we have different kinds of ADTs, primitive types and special type
/// constructors like tuples and function pointers.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)]
pub struct TypeCtorId(salsa::InternId);
impl_intern_key!(TypeCtorId);
/// This exists just for Chalk, because Chalk just has a single `FnDefId` where
/// we have different IDs for struct and enum variant constructors.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)]