1
Fork 0

Auto merge of #100032 - BoxyUwU:no_ty_in_placeholder_const, r=compiler-errors

make `PlaceholderConst` not store the type of the const

Currently the `Placeholder` variant on `ConstKind` is 28 bytes when with this PR its 8 bytes, i am not sure this is really useful at all rn since `Unevaluated` and `Value` variants are huge still but eventually it should be possible to get both down to 16 bytes 🤔. Mostly opening this to see if this change has any perf impact when done before it can make `ConstKind`/`ConstS` smaller
This commit is contained in:
bors 2022-08-02 13:10:49 +00:00
commit 06f4950cbd
8 changed files with 21 additions and 19 deletions

View file

@ -2067,7 +2067,7 @@ fn replace_param_and_infer_substs_with_placeholder<'tcx>(
ty,
kind: ty::ConstKind::Placeholder(ty::PlaceholderConst {
universe: ty::UniverseIndex::ROOT,
name: ty::BoundConst { ty, var: ty::BoundVar::from_usize(idx) },
name: ty::BoundVar::from_usize(idx),
}),
})
.into()