Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/interner.rs')
| -rw-r--r-- | crates/hir-ty/src/interner.rs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/crates/hir-ty/src/interner.rs b/crates/hir-ty/src/interner.rs index 804c3aea3a..fecb3f4242 100644 --- a/crates/hir-ty/src/interner.rs +++ b/crates/hir-ty/src/interner.rs @@ -2,16 +2,15 @@ //! representation of the various objects Chalk deals with (types, goals etc.). use crate::{ - chalk_db, tls, AliasTy, CanonicalVarKind, CanonicalVarKinds, ClosureId, Const, ConstData, - ConstScalar, Constraint, Constraints, FnAbi, FnDefId, GenericArg, GenericArgData, Goal, - GoalData, Goals, InEnvironment, Lifetime, LifetimeData, OpaqueTy, OpaqueTyId, ProgramClause, - ProgramClauseData, ProgramClauses, ProjectionTy, QuantifiedWhereClause, QuantifiedWhereClauses, - Substitution, Ty, TyData, TyKind, VariableKind, VariableKinds, + AliasTy, CanonicalVarKind, CanonicalVarKinds, ClosureId, Const, ConstData, ConstScalar, + Constraint, Constraints, FnAbi, FnDefId, GenericArg, GenericArgData, Goal, GoalData, Goals, + InEnvironment, Lifetime, LifetimeData, OpaqueTy, OpaqueTyId, ProgramClause, ProgramClauseData, + ProgramClauses, ProjectionTy, QuantifiedWhereClause, QuantifiedWhereClauses, Substitution, Ty, + TyData, TyKind, VariableKind, VariableKinds, chalk_db, tls, }; -use base_db::ra_salsa::InternId; use chalk_ir::{ProgramClauseImplication, SeparatorTraitRef, Variance}; use hir_def::TypeAliasId; -use intern::{impl_internable, Interned}; +use intern::{Interned, impl_internable}; use smallvec::SmallVec; use std::fmt; use triomphe::Arc; @@ -44,7 +43,7 @@ impl_internable!( InternedWrapper<ConstData>, InternedWrapper<ConstScalar>, InternedWrapper<Vec<CanonicalVarKind>>, - InternedWrapper<Vec<ProgramClause>>, + InternedWrapper<Box<[ProgramClause]>>, InternedWrapper<Vec<QuantifiedWhereClause>>, InternedWrapper<SmallVec<[Variance; 16]>>, ); @@ -61,14 +60,14 @@ impl chalk_ir::interner::Interner for Interner { type InternedGoal = Arc<GoalData>; type InternedGoals = Vec<Goal>; type InternedSubstitution = Interned<InternedWrapper<SmallVec<[GenericArg; 2]>>>; - type InternedProgramClauses = Interned<InternedWrapper<Vec<ProgramClause>>>; + type InternedProgramClauses = Interned<InternedWrapper<Box<[ProgramClause]>>>; type InternedProgramClause = ProgramClauseData; type InternedQuantifiedWhereClauses = Interned<InternedWrapper<Vec<QuantifiedWhereClause>>>; type InternedVariableKinds = Interned<InternedWrapper<Vec<VariableKind>>>; type InternedCanonicalVarKinds = Interned<InternedWrapper<Vec<CanonicalVarKind>>>; type InternedConstraints = Vec<InEnvironment<Constraint>>; type InternedVariances = SmallVec<[Variance; 16]>; - type DefId = InternId; + type DefId = salsa::Id; type InternedAdtId = hir_def::AdtId; type Identifier = TypeAliasId; type FnAbi = FnAbi; @@ -98,7 +97,7 @@ impl chalk_ir::interner::Interner for Interner { opaque_ty_id: OpaqueTyId, fmt: &mut fmt::Formatter<'_>, ) -> Option<fmt::Result> { - Some(write!(fmt, "OpaqueTy#{}", opaque_ty_id.0)) + Some(write!(fmt, "OpaqueTy#{:?}", opaque_ty_id.0)) } fn debug_fn_def_id(fn_def_id: FnDefId, fmt: &mut fmt::Formatter<'_>) -> Option<fmt::Result> { |