]> git.lizzy.rs Git - rust.git/blob - src/test/ui/chalkify/recursive_where_clause_on_type.rs
Rollup merge of #92942 - Xaeroxe:raw_arg, r=dtolnay
[rust.git] / src / test / ui / chalkify / recursive_where_clause_on_type.rs
1 // FIXME(chalk): should fail, see comments
2 // check-fail
3 // compile-flags: -Z chalk
4
5 #![feature(trivial_bounds)]
6
7 trait Bar {
8     fn foo();
9 }
10 trait Foo: Bar { }
11
12 struct S where S: Foo;
13
14 impl Foo for S {
15 }
16
17 fn bar<T: Bar>() {
18     T::foo();
19 }
20
21 fn foo<T: Foo>() {
22     bar::<T>()
23 }
24
25 fn main() {
26     // For some reason, the error is duplicated...
27
28     foo::<S>() //~ ERROR the type `S` is not well-formed (chalk)
29     //~^ ERROR the type `S` is not well-formed (chalk)
30 }