The full macro:
$(#[$StructMeta:meta])*
$Vis:vis struct $StructName:ident $(<$OwnerLifetime:lifetime>)? {
owner: $Owner:ty,
#[$Covariance:ident]
dependent: $Dependent:ident,
}
$(impl {$($AutomaticDerive:ident),*})?
The relevant parts for this question:
$(<$OwnerLifetime:lifetime>)?
[...]
$(impl {$($AutomaticDerive:ident),*})?
// The user has to choose which traits can and should be automatically
// implemented for the cell.
$($(
$crate::_impl_automatic_derive!($AutomaticDerive, $StructName $OwnerLifetime*);
)*)*
macro_rules! _impl_automatic_derive {
(Debug, $StructName:ident $(, $OwnerLifetime:lifetime)?) => {
[...]
How could I pass the optional $OwnerLifetime
to _impl_automatic_derive
?