]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/trait-where-clause.rs
Auto merge of #105651 - tgross35:once-cell-inline, r=m-ou-se
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / trait-where-clause.rs
1 #![feature(const_trait_impl)]
2
3 #[const_trait]
4 trait Bar {}
5
6 trait Foo {
7     fn a();
8     fn b() where Self: ~const Bar;
9     fn c<T: ~const Bar>();
10 }
11
12 fn test1<T: Foo>() {
13     T::a();
14     T::b();
15     //~^ ERROR the trait bound
16     T::c::<T>();
17     //~^ ERROR the trait bound
18 }
19
20 fn test2<T: Foo + Bar>() {
21     T::a();
22     T::b();
23     T::c::<T>();
24 }
25
26 fn main() {}