2023-02-20 23:16:35 -06:00
|
|
|
error[E0277]: the trait bound `for<'a> &'a T: Bar` is not satisfied
|
|
|
|
--> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:13:11
|
|
|
|
|
|
|
|
|
LL | fn foo<T: Foo>() {}
|
|
|
|
| ^^^ the trait `for<'a> Bar` is not implemented for `&'a T`
|
|
|
|
|
|
|
|
|
note: required by a bound in `Foo`
|
|
|
|
--> $DIR/correct-binder-for-arbitrary-bound-sugg.rs:3:23
|
|
|
|
|
|
|
|
|
LL | trait Foo
|
|
|
|
| --- required by a bound in this trait
|
|
|
|
LL | where
|
|
|
|
LL | for<'a> &'a Self: Bar,
|
|
|
|
| ^^^ required by this bound in `Foo`
|
|
|
|
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
|
|
|
|
|
|
|
|
|
LL | fn foo<T: Foo>() where for<'a> &'a T: Bar {}
|
|
|
|
| ++++++++++++++++++++++++
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2023-02-20 23:16:35 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|