aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/traits/chalk
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-05-22 16:50:58 +0100
committerFlorian Diebold <[email protected]>2020-05-22 18:52:06 +0100
commit27fe68ad5c908d439af6cfbe7748c56eb6f107fc (patch)
tree4931a1d08d930dadee18e2f9d521e29d255f81b2 /crates/ra_hir_ty/src/traits/chalk
parent1d0e27254d6376e980dc19e67dfcc598c7e97231 (diff)
Use TypeCtorId as AdtId directly, and rename the type alias StructId -> AdtId
Diffstat (limited to 'crates/ra_hir_ty/src/traits/chalk')
-rw-r--r--crates/ra_hir_ty/src/traits/chalk/interner.rs6
-rw-r--r--crates/ra_hir_ty/src/traits/chalk/tls.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/traits/chalk/interner.rs b/crates/ra_hir_ty/src/traits/chalk/interner.rs
index 032deca75..d98e5cb2d 100644
--- a/crates/ra_hir_ty/src/traits/chalk/interner.rs
+++ b/crates/ra_hir_ty/src/traits/chalk/interner.rs
@@ -14,7 +14,7 @@ pub type AssocTypeId = chalk_ir::AssocTypeId<Interner>;
14pub type AssociatedTyDatum = chalk_rust_ir::AssociatedTyDatum<Interner>; 14pub type AssociatedTyDatum = chalk_rust_ir::AssociatedTyDatum<Interner>;
15pub type TraitId = chalk_ir::TraitId<Interner>; 15pub type TraitId = chalk_ir::TraitId<Interner>;
16pub type TraitDatum = chalk_rust_ir::TraitDatum<Interner>; 16pub type TraitDatum = chalk_rust_ir::TraitDatum<Interner>;
17pub type StructId = chalk_ir::AdtId<Interner>; 17pub type AdtId = chalk_ir::AdtId<Interner>;
18pub type StructDatum = chalk_rust_ir::AdtDatum<Interner>; 18pub type StructDatum = chalk_rust_ir::AdtDatum<Interner>;
19pub type ImplId = chalk_ir::ImplId<Interner>; 19pub type ImplId = chalk_ir::ImplId<Interner>;
20pub type ImplDatum = chalk_rust_ir::ImplDatum<Interner>; 20pub type ImplDatum = chalk_rust_ir::ImplDatum<Interner>;
@@ -36,10 +36,10 @@ impl chalk_ir::interner::Interner for Interner {
36 type InternedVariableKinds = Vec<chalk_ir::VariableKind<Self>>; 36 type InternedVariableKinds = Vec<chalk_ir::VariableKind<Self>>;
37 type InternedCanonicalVarKinds = Vec<chalk_ir::CanonicalVarKind<Self>>; 37 type InternedCanonicalVarKinds = Vec<chalk_ir::CanonicalVarKind<Self>>;
38 type DefId = InternId; 38 type DefId = InternId;
39 type InternedAdtId = InternId; 39 type InternedAdtId = crate::TypeCtorId;
40 type Identifier = TypeAliasId; 40 type Identifier = TypeAliasId;
41 41
42 fn debug_adt_id(type_kind_id: StructId, fmt: &mut fmt::Formatter<'_>) -> Option<fmt::Result> { 42 fn debug_adt_id(type_kind_id: AdtId, fmt: &mut fmt::Formatter<'_>) -> Option<fmt::Result> {
43 tls::with_current_program(|prog| Some(prog?.debug_struct_id(type_kind_id, fmt))) 43 tls::with_current_program(|prog| Some(prog?.debug_struct_id(type_kind_id, fmt)))
44 } 44 }
45 45
diff --git a/crates/ra_hir_ty/src/traits/chalk/tls.rs b/crates/ra_hir_ty/src/traits/chalk/tls.rs
index b7eb49d7b..5dfd8e3ec 100644
--- a/crates/ra_hir_ty/src/traits/chalk/tls.rs
+++ b/crates/ra_hir_ty/src/traits/chalk/tls.rs
@@ -15,7 +15,7 @@ pub struct DebugContext<'a>(&'a (dyn HirDatabase + 'a));
15impl DebugContext<'_> { 15impl DebugContext<'_> {
16 pub fn debug_struct_id( 16 pub fn debug_struct_id(
17 &self, 17 &self,
18 id: super::StructId, 18 id: super::AdtId,
19 f: &mut fmt::Formatter<'_>, 19 f: &mut fmt::Formatter<'_>,
20 ) -> Result<(), fmt::Error> { 20 ) -> Result<(), fmt::Error> {
21 let type_ctor: TypeCtor = from_chalk(self.0, TypeName::Adt(id)); 21 let type_ctor: TypeCtor = from_chalk(self.0, TypeName::Adt(id));