]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/associated-type-bound-fail.rs
Merge commit '4c41a222ca5d1325fb4b6709395bd06e766cc042' into clippyup
[rust.git] / src / test / ui / const-generics / associated-type-bound-fail.rs
1 // revisions: full min
2 #![cfg_attr(full, allow(incomplete_features))]
3 #![cfg_attr(full, feature(const_generics))]
4
5 trait Bar<const N: usize> {}
6
7 trait Foo<const N: usize> {
8     type Assoc: Bar<N>;
9 }
10
11 impl Bar<3> for u16 {}
12 impl<const N: usize> Foo<N> for i16 {
13     type Assoc = u16; //~ ERROR the trait bound `u16: Bar<N>`
14 }
15
16 fn main() {}