3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
6 trait Bar<const N: usize> { fn bar() {} }
7 trait Foo<const N: usize>: Bar<N> {}
9 fn test<T, const N: usize>() where T: Foo<N> {
13 struct Faz<const N: usize>;
15 impl<const N: usize> Faz<N> {
16 fn test<T>() where T: Foo<N> {
21 trait Fiz<const N: usize> {
22 fn fiz<T>() where T: Foo<N> {
27 impl<const N: usize> Bar<N> for u8 {}
28 impl<const N: usize> Foo<N> for u8 {}
29 impl<const N: usize> Fiz<N> for u8 {}
32 Faz::<3>::test::<u8>();
33 <u8 as Fiz<13>>::fiz::<u8>();