Open Niedzwiedzw opened 3 months ago
Hey, thanks for the feedback. I don't really understand what you're asking for, though:
The trait
which #[extension(trait SomeIdentifier)]
uses is mainly to be imported in some scope to get access to its methods, rather than being used as a trait bound in a signature. That is, writing fn example<T: SomeIdentifier>
later on is not really expected.
So I do wonder about your need. The "Sized
-ness" ought to stem from whichever generic thing you write in the impl:
impl<...> /* write a Sized type here */ {
In fact, you should be able to add a where Self : Sized
clause to that impl
if that is more convenient.
Otherwise, I imagine you have a code snippet which fails without that bound, would you mind sharing it so that I can better grasp what you need / are looking for? 🙂
yeah so for some reason it asks me to specify that it's : Sized
when using the macro but when doing it manually it doesn't. I can't really share the macro cause it's for work...
I'll try playing with the where clause, but idk what the syntax is, could you provide a minimal example?
#[extension(/* pub */ trait YourTraitName)]
impl<…> …
where
…,
Self : Sized, // 👈
{
…
}
ok I'm sure this will solve it, thank you very much
great library, seriously - deserves more praise. I only found this issue once, so idk if you'd be interested in extentending the macro. manually writing trait with
: Sized
bound and implementing it on a type makes it compile