]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / trait-where-clause-self-referential.rs
1 // check-pass
2
3 #![feature(const_trait_impl)]
4
5 trait Foo {
6     fn bar() where Self: ~const Foo;
7 }
8
9 struct S;
10
11 impl Foo for S {
12     fn bar() {}
13 }
14
15 fn baz<T: Foo>() {
16     T::bar();
17 }
18
19 const fn qux<T: ~const Foo>() {
20     T::bar();
21 }
22
23 fn main() {}