You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be quite neat to have derive macros for all num-traits and this shouldn't be breaking.
Use cases would mostly to write simple wrappers as such to make trait implementations easier down the line, but there could be other benefits from this as well:
#[derive(Float,FloatCore)structFloat<F>(F)whereF:Float + FloatCore;
#[derive(PrimInt)structInteger<I>(I)whereF:PrimInt;traitFoo{}//not necessary to implement f32, f64 directlyimpl<F> FooforFloat<F>{}//same here for u8, i8, u16, ...impl<I> FooforInteger<I>{}
The text was updated successfully, but these errors were encountered:
I think it would be quite neat to have derive macros for all num-traits and this shouldn't be breaking.
Use cases would mostly to write simple wrappers as such to make trait implementations easier down the line, but there could be other benefits from this as well:
The text was updated successfully, but these errors were encountered: