1 #![feature(const_generics, const_evaluatable_checked)]
2 #![allow(incomplete_features)]
4 trait Foo<const N: usize> {
5 fn test(&self) -> [u8; N + 1];
8 impl<const N: usize> Foo<N> for () {
9 fn test(&self) -> [u8; N + 1] {
14 fn use_dyn<const N: usize>(v: &dyn Foo<N>) where [u8; N + 1]: Sized {
15 assert_eq!(v.test(), [0; N + 1]);
19 // FIXME(const_evaluatable_checked): Improve the error message here.
21 //~^ ERROR type annotations needed