Shrink `WherePredicate` by 8 bytes
diff --git a/crates/hir-def/src/expr_store/lower/generics.rs b/crates/hir-def/src/expr_store/lower/generics.rs
index 004bbe9..5cea8a2 100644
--- a/crates/hir-def/src/expr_store/lower/generics.rs
+++ b/crates/hir-def/src/expr_store/lower/generics.rs
@@ -227,7 +227,7 @@
(_, TypeBound::Error | TypeBound::Use(_)) => return,
(Either::Left(type_ref), bound) => match hrtb_lifetimes {
Some(hrtb_lifetimes) => WherePredicate::ForLifetime {
- lifetimes: hrtb_lifetimes.to_vec().into_boxed_slice(),
+ lifetimes: ThinVec::from_iter(hrtb_lifetimes.iter().cloned()),
target: type_ref,
bound,
},
diff --git a/crates/hir-def/src/hir/generics.rs b/crates/hir-def/src/hir/generics.rs
index 685847c..1bb9e48 100644
--- a/crates/hir-def/src/hir/generics.rs
+++ b/crates/hir-def/src/hir/generics.rs
@@ -4,6 +4,7 @@
use hir_expand::name::Name;
use la_arena::{Arena, Idx, RawIdx};
use stdx::impl_from;
+use thin_vec::ThinVec;
use triomphe::Arc;
use crate::{
@@ -171,7 +172,7 @@
pub enum WherePredicate {
TypeBound { target: TypeRefId, bound: TypeBound },
Lifetime { target: LifetimeRef, bound: LifetimeRef },
- ForLifetime { lifetimes: Box<[Name]>, target: TypeRefId, bound: TypeBound },
+ ForLifetime { lifetimes: ThinVec<Name>, target: TypeRefId, bound: TypeBound },
}
static EMPTY: LazyLock<Arc<GenericParams>> = LazyLock::new(|| {