]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/associated-type-bound-fail.rs
Auto merge of #105924 - TimNN:ui-remap, r=Mark-Simulacrum
[rust.git] / tests / ui / const-generics / associated-type-bound-fail.rs
1 trait Bar<const N: usize> {}
2
3 trait Foo<const N: usize> {
4     type Assoc: Bar<N>;
5 }
6
7 impl Bar<3> for u16 {}
8 impl<const N: usize> Foo<N> for i16 {
9     type Assoc = u16; //~ ERROR the trait bound `u16: Bar<N>`
10 }
11
12 fn main() {}