]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/associated-type-bound.rs
Auto merge of #79578 - alexcrichton:update-waasi, r=KodrAus
[rust.git] / src / test / ui / const-generics / associated-type-bound.rs
1 // run-pass
2 // revisions: full min
3 #![cfg_attr(full, allow(incomplete_features))]
4 #![cfg_attr(full, feature(const_generics))]
5
6 trait Bar<const N: usize> {}
7
8 trait Foo<const N: usize> {
9     type Assoc: Bar<N>;
10 }
11
12 impl<const N: usize> Bar<N> for u8 {}
13 impl Bar<3> for u16 {}
14
15 impl<const N: usize> Foo<N> for i8 {
16     type Assoc = u8;
17 }
18
19 impl Foo<3> for i16 {
20     type Assoc = u16;
21 }
22
23 fn main() {}