]> git.proxmox.com Git - rustc.git/blob - tests/ui/const-generics/associated-type-bound.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / const-generics / associated-type-bound.rs
1 // run-pass
2 trait Bar<const N: usize> {}
3
4 trait Foo<const N: usize> {
5 type Assoc: Bar<N>;
6 }
7
8 impl<const N: usize> Bar<N> for u8 {}
9 impl Bar<3> for u16 {}
10
11 impl<const N: usize> Foo<N> for i8 {
12 type Assoc = u8;
13 }
14
15 impl Foo<3> for i16 {
16 type Assoc = u16;
17 }
18
19 fn main() {}