Closed
Description
It was surprising to me that the program
use std::kinds::marker::ContravariantLifetime;
#[deriving(Hash, Eq, PartialEq)]
struct A<'a> {
x: u64,
marker: ContravariantLifetime<'a>,
}
fn main() { }
gives this error:
test.rs:6:5: 6:38 error: type `core::kinds::marker::ContravariantLifetime<'_>` does not implement any method in scope named `assert_receiver_is_total_eq`
test.rs:6 marker: ContravariantLifetime<'a>,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test.rs:3:18: 3:20 note: in expansion of #[deriving(Eq)]
test.rs:6:5: 6:38 note: expansion site
test.rs:6:5: 6:38 error: type `core::kinds::marker::ContravariantLifetime<'_>` does not implement any method in scope named `hash`
test.rs:6 marker: ContravariantLifetime<'a>,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test.rs:3:12: 3:16 note: in expansion of #[deriving(Hash)]
test.rs:6:5: 6:38 note: expansion site
error: aborting due to 2 previous errors
Metadata
Metadata
Assignees
Labels
No labels