rust/tests/ui/const-generics/generic_const_exprs/auxiliary/feature-attribute-missing-in-dependent-crate-ice-aux.rs
Jacob Adam b8302ce605
Add a regression test for an ICE with the generic_const_exprs feature attribute.
It ensures that using the `generic_const_exprs` feature in a library crate
without enabling it in a dependent crate does not lead to an ICE.
2025-07-29 09:35:36 +02:00

10 lines
214 B
Rust

#![feature(generic_const_exprs)]
pub struct Error(());
pub trait FromSlice: Sized {
const SIZE: usize = std::mem::size_of::<Self>();
fn validate_slice(bytes: &[[u8; Self::SIZE]]) -> Result<(), Error>;
}