Files
rust/tests/ui/const-generics/generic_const_exprs/simple_fail.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
264 B
Rust
Raw Normal View History

#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
type Arr<const N: usize> = [u8; N - 1];
//~^ ERROR overflow
fn test<const N: usize>() -> Arr<N>
where
[u8; N - 1]: Sized,
//~^ ERROR overflow
{
todo!()
}
fn main() {
test::<0>();
}