2020-09-02 10:40:56 +03:00
|
|
|
error[E0277]: the trait bound `Self: Eq` is not satisfied
|
2020-01-18 14:57:56 -08:00
|
|
|
--> $DIR/wf-trait-default-fn-ret.rs:11:22
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-01-18 14:57:56 -08:00
|
|
|
LL | fn bar(&self) -> Bar<Self> {
|
2020-09-02 10:40:56 +03:00
|
|
|
| ^^^^^^^^^ the trait `Eq` is not implemented for `Self`
|
2020-04-22 16:31:58 -07:00
|
|
|
|
|
2021-07-31 09:26:55 -07:00
|
|
|
note: required by a bound in `Bar`
|
|
|
|
--> $DIR/wf-trait-default-fn-ret.rs:8:14
|
|
|
|
|
|
|
|
|
LL | struct Bar<T:Eq+?Sized> { value: Box<T> }
|
|
|
|
| ^^ required by this bound in `Bar`
|
2020-04-22 16:31:58 -07:00
|
|
|
help: consider further restricting `Self`
|
|
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
LL | fn bar(&self) -> Bar<Self> where Self: Eq {
|
2021-06-21 19:07:19 -07:00
|
|
|
| ++++++++++++++
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|