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