assert that unexpectedly unsized fields are sized in the param env

This commit is contained in:
Lukas Markeffsky 2024-09-16 21:04:20 +02:00
parent 697450151c
commit 3db930a463
4 changed files with 64 additions and 57 deletions

View file

@ -20,7 +20,7 @@ pub struct IndexSlice<I: Idx, T> {
impl<I: Idx, T> IndexSlice<I, T> {
#[inline]
pub const fn empty() -> &'static Self {
pub const fn empty<'a>() -> &'a Self {
Self::from_raw(&[])
}