Skip to content

Commit d4daca9

Browse files
Merge #4573
4573: Chalk cleanups r=matklad a=flodiebold - split off the `Interner` impl and the conversion code into their own modules - use `TypeCtorId` as `AdtId` directly (instead of raw `InternId`s), and rename the type alias `StructId` -> `AdtId` - provide missing Chalk debug impls Co-authored-by: Florian Diebold <[email protected]>
2 parents b38f9a5 + ea265aa commit d4daca9

File tree

6 files changed

+1105
-969
lines changed

6 files changed

+1105
-969
lines changed

crates/ra_hir_ty/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub trait HirDatabase: DefDatabase + Upcast<dyn DefDatabase> {
8989
fn trait_datum(&self, krate: CrateId, trait_id: chalk::TraitId) -> Arc<chalk::TraitDatum>;
9090

9191
#[salsa::invoke(chalk::struct_datum_query)]
92-
fn struct_datum(&self, krate: CrateId, struct_id: chalk::StructId) -> Arc<chalk::StructDatum>;
92+
fn struct_datum(&self, krate: CrateId, struct_id: chalk::AdtId) -> Arc<chalk::StructDatum>;
9393

9494
#[salsa::invoke(crate::traits::chalk::impl_datum_query)]
9595
fn impl_datum(&self, krate: CrateId, impl_id: chalk::ImplId) -> Arc<chalk::ImplDatum>;

crates/ra_hir_ty/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub enum TypeCtor {
155155
/// This exists just for Chalk, because Chalk just has a single `StructId` where
156156
/// we have different kinds of ADTs, primitive types and special type
157157
/// constructors like tuples and function pointers.
158-
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
158+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Ord, PartialOrd)]
159159
pub struct TypeCtorId(salsa::InternId);
160160
impl_intern_key!(TypeCtorId);
161161

0 commit comments

Comments
 (0)