~ireas/public-inbox

1

[merge-rs] Cannot derive Merge for struct with generics

Details
Message ID
<CAEApOF_uo_9enYqhpBgw8y2cB3ZFYN+-jFf7TB314WzWSZJiKw@mail.gmail.com>
DKIM signature
pass
Download raw message
I am trying the following usage:

#[derive(Merge)]
pub struct Test<T> {
    text: Option<T>,
}

My compiler complains about missing generics for struct `Test`

I wonder if what I am trying to do is an intended use case.
Details
Message ID
<20220310093436.GA4984@ireas.org>
In-Reply-To
<CAEApOF_uo_9enYqhpBgw8y2cB3ZFYN+-jFf7TB314WzWSZJiKw@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
Thanks for the report!  That is definitely a valid use case.  Probably I
just did not handle type parameters in the macro rules.  I’ll have a
look at it and see whether this can be fixed easily.

/Robin
Reply to thread Export thread (mbox)