mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
17 lines
352 B
Rust
17 lines
352 B
Rust
//~ ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
|
|
// compile-flags: -Ztrait-solver=next
|
|
|
|
trait Foo {
|
|
type Assoc;
|
|
}
|
|
|
|
trait Bar {}
|
|
fn needs_bar<S: Bar>() {}
|
|
|
|
fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() {
|
|
needs_bar::<T::Assoc>();
|
|
//~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
|
|
}
|
|
|
|
fn main() {}
|