3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
7 trait Bar<const N: usize> { fn bar() {} }
8 trait Foo<const N: usize>: Bar<N> {}
10 fn test<T, const N: usize>() where T: Foo<N> {
14 struct Faz<const N: usize>;
16 impl<const N: usize> Faz<N> {
17 fn test<T>() where T: Foo<N> {
22 trait Fiz<const N: usize> {
23 fn fiz<T>() where T: Foo<N> {
28 impl<const N: usize> Bar<N> for u8 {}
29 impl<const N: usize> Foo<N> for u8 {}
30 impl<const N: usize> Fiz<N> for u8 {}
33 Faz::<3>::test::<u8>();
34 <u8 as Fiz<13>>::fiz::<u8>();