| error[E0277]: can't compare `SomeNode` with `SomeNode` |
| --> $DIR/derive-implicit-bound.rs:25:15 |
| | |
| LL | accept_eq(&node); |
| | --------- ^^^^^ no implementation for `SomeNode == SomeNode` |
| | | |
| | required by a bound introduced by this call |
| | |
| = help: the trait `PartialEq` is not implemented for `SomeNode` |
| note: required for `Id<SomeNode>` to implement `PartialEq` |
| --> $DIR/derive-implicit-bound.rs:6:12 |
| | |
| LL | #[derive(PartialEq, Eq)] |
| | --------- in this derive macro expansion |
| LL | pub struct Id<T>(PhantomData<T>); |
| | ^^ - type parameter would need to implement `PartialEq` |
| = help: consider manually implementing `PartialEq` to avoid undesired bounds |
| note: required by a bound in `accept_eq` |
| --> $DIR/derive-implicit-bound.rs:17:23 |
| | |
| LL | fn accept_eq(_: &impl PartialEq) { } |
| | ^^^^^^^^^ required by this bound in `accept_eq` |
| help: consider annotating `SomeNode` with `#[derive(PartialEq)]` |
| | |
| LL + #[derive(PartialEq)] |
| LL | struct SomeNode(); |
| | |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0277`. |