Problem trying to declare a SEQUENCE that contains an ENUMERATED field. Code as follows:
#[derive(Enumerated, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
#[repr(u32)]
enum EID {
e1 = 1,
e2 = 2,
e3 = 3
}
#[derive(Clone, Debug, Eq, PartialEq, Sequence, PartialOrd, Ord)]
pub struct E {
eid: EID,
b1: bool,
b2: bool,
}
impl OrdIsValueOrd for E {}
type SetOfE = SetOf<E, 2>;
Compiling says:
error[E0759]: decoder has an anonymous lifetime '_ but it needs to satisfy a 'static lifetime requirement
--> src/main.rs:83:39
|
83 | #[derive(Clone, Debug, Eq, PartialEq, Sequence, PartialOrd, Ord)]
| ^^^^^^^^
| |
| this data with an anonymous lifetime '_...
| ...is captured and required to live as long as 'static here
|
= note: this error originates in the derive macro Sequence (in Nightly builds, run with -Z macro-backtrace for more info)