]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2632-const-trait-impl/inherent-impl-const-bounds.rs
Rollup merge of #106716 - c410-f3r:rfc-2397-1, r=davidtwco
[rust.git] / tests / ui / rfc-2632-const-trait-impl / inherent-impl-const-bounds.rs
1 // check-pass
2 #![feature(const_trait_impl)]
3
4 struct S;
5
6 #[const_trait]
7 trait A {}
8 #[const_trait]
9 trait B {}
10
11 impl const A for S {}
12 impl const B for S {}
13
14 impl S {
15     const fn a<T: ~const A>() where T: ~const B {
16
17     }
18 }
19
20 const _: () = S::a::<S>();
21
22 fn main() {}