rust-custom-derive icon indicating copy to clipboard operation
rust-custom-derive copied to clipboard

Allow lifetime usage in custom_derive! macro

Open Nimamoh opened this issue 8 years ago • 0 comments

Hello,

I recently tried the custom derive with derive_builder on a lifetimed struct like this:

custom_derive! {
    #[derive(Debug, PartialEq, Default, Clone, Builder)]
    struct Another<'a> {
        title: &'a str,
    }
}

The rust compiler gives me this error:

error: expected ident, found 'a

Nimamoh avatar Jan 24 '17 12:01 Nimamoh