]> git.proxmox.com Git - rustc.git/blob - tests/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / rfc-2632-const-trait-impl / trait-where-clause-self-referential.rs
1 // check-pass
2
3 #![feature(const_trait_impl)]
4
5 #[const_trait]
6 trait Foo {
7 fn bar() where Self: ~const Foo;
8 }
9
10 struct S;
11
12 impl Foo for S {
13 fn bar() {}
14 }
15
16 fn baz<T: Foo>() {
17 T::bar();
18 }
19
20 const fn qux<T: ~const Foo>() {
21 T::bar();
22 }
23
24 fn main() {}