]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/trait-where-clause-self-referential.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[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 #![feature(const_fn_trait_bound)]
5
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() {}