]> git.lizzy.rs Git - rust.git/blob - src/test/ui/wf/wf-trait-default-fn-ret.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / wf / wf-trait-default-fn-ret.stderr
1 error[E0277]: the trait bound `Self: std::cmp::Eq` is not satisfied
2   --> $DIR/wf-trait-default-fn-ret.rs:21:5
3    |
4 LL | /     fn bar(&self) -> Bar<Self> {
5 LL | |         //~^ ERROR E0277
6 LL | |         //
7 LL | |         // Here, Eq ought to be implemented.
8 LL | |         loop { }
9 LL | |     }
10    | |_____^ the trait `std::cmp::Eq` is not implemented for `Self`
11    |
12    = help: consider adding a `where Self: std::cmp::Eq` bound
13 note: required by `Bar`
14   --> $DIR/wf-trait-default-fn-ret.rs:18:1
15    |
16 LL | struct Bar<T:Eq+?Sized> { value: Box<T> }
17    | ^^^^^^^^^^^^^^^^^^^^^^^
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0277`.