rust/src/test/ui/chalkify/recursive_where_clause_on_t...

31 lines
465 B
Rust
Raw Normal View History

2020-03-03 17:25:03 +01:00
// FIXME(chalk): should fail, see comments
2020-05-27 07:05:09 +02:00
// check-fail
2020-03-03 17:25:03 +01:00
// compile-flags: -Z chalk
#![feature(trivial_bounds)]
trait Bar {
fn foo();
}
trait Foo: Bar { }
struct S where S: Foo;
impl Foo for S {
}
fn bar<T: Bar>() {
T::foo();
}
fn foo<T: Foo>() {
bar::<T>()
}
fn main() {
// For some reason, the error is duplicated...
2020-05-27 07:05:09 +02:00
foo::<S>() //~ ERROR the type `S` is not well-formed (chalk)
//~^ ERROR the type `S` is not well-formed (chalk)
2020-03-03 17:25:03 +01:00
}