shrink_to_fit() in more places

This saves 18mb on `analysis-stats .`, without regressing speed.
This commit is contained in:
Chayim Refael Friedman 2025-04-25 09:40:53 +03:00
parent 5ff4ba347d
commit 1fe060719a
8 changed files with 51 additions and 27 deletions

View file

@ -43,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]>>,
);
@ -60,7 +60,7 @@ 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>>>;