2025-02-27 11:57:05 +01:00
|
|
|
error[E0277]: the trait bound `<T as Foo>::Assoc: Bar` is not satisfied
|
2024-01-26 15:26:03 +01:00
|
|
|
--> $DIR/recursive-self-normalization.rs:11:17
|
|
|
|
|
|
|
|
|
|
|
LL | needs_bar::<T::Assoc>();
|
2025-02-27 11:57:05 +01:00
|
|
|
| ^^^^^^^^ the trait `Bar` is not implemented for `<T as Foo>::Assoc`
|
2023-03-29 15:36:17 +02:00
|
|
|
|
|
|
|
|
|
note: required by a bound in `needs_bar`
|
2023-12-08 17:29:48 +01:00
|
|
|
--> $DIR/recursive-self-normalization.rs:8:17
|
2023-03-29 15:36:17 +02:00
|
|
|
|
|
|
|
|
|
LL | fn needs_bar<S: Bar>() {}
|
|
|
|
|
| ^^^ required by this bound in `needs_bar`
|
2025-02-27 11:57:05 +01:00
|
|
|
help: consider further restricting the associated type
|
2024-01-10 16:30:07 +00:00
|
|
|
|
|
2025-02-27 11:57:05 +01:00
|
|
|
LL | fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() where <T as Foo>::Assoc: Bar {
|
|
|
|
|
| ++++++++++++++++++++++++++++
|
2024-01-10 16:30:07 +00:00
|
|
|
|
2025-02-27 11:57:05 +01:00
|
|
|
error: aborting due to 1 previous error
|
2023-03-27 21:48:43 +00:00
|
|
|
|
2025-02-27 11:57:05 +01:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|