mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-04 15:05:30 +00:00
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.
10 lines
214 B
Rust
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>;
|
|
}
|