#1998 changed the type signature of OctetStringRef from:
pub struct OctetStringRef<'a>
to:
pub struct OctetStringRef
where the type is now used as &'a OctetStringRef.
However to simplify the change, der_derive did not receive a proper corresponding update, but rather now uses an type alias to preserve the old shape:
https://github.com/RustCrypto/formats/blob/f7905f1/der/src/asn1/octet_string.rs#L13
pub type OctetStringRefDeriveHack<'a> = &'a OctetStringRef;
...which is now used in the custom derive here:
https://github.com/RustCrypto/formats/blob/f7905f1/der_derive/src/asn1_type.rs#L97
Asn1Type::OctetString => quote!(::der::asn1::OctetStringRefDeriveHack),
For a proper fix, der_derive needs to be updated to have first-class support for referring to such types via a &'a MyRef lifetime instead of a MyRef<'a> lifetime.
#1998 changed the type signature of
OctetStringReffrom:to:
where the type is now used as
&'a OctetStringRef.However to simplify the change,
der_derivedid not receive a proper corresponding update, but rather now uses an type alias to preserve the old shape:https://github.com/RustCrypto/formats/blob/f7905f1/der/src/asn1/octet_string.rs#L13
...which is now used in the custom derive here:
https://github.com/RustCrypto/formats/blob/f7905f1/der_derive/src/asn1_type.rs#L97
For a proper fix,
der_deriveneeds to be updated to have first-class support for referring to such types via a&'a MyReflifetime instead of aMyRef<'a>lifetime.