Closed audunhalland closed 2 years ago
Instead of
#[entrait_impl] mod some_mod { #[derive_impl(super::SomeTrait)] pub struct SomeType; }
The macro should instead work with:
pub struct SomeType; #[entrait_impl] // ? impl SomeTrait for SomeType { fn foo(deps: &impl SomethingElse) {} }
which would expand to:
impl SomeType { // <--- removed "SomeTrait for" from this location fn foo(deps: &impl SomethingElse) {} } impl<T> SomeTrait<T> for SomeType { // <--- move into this place fn foo(__impl: &Impl<T>) { Self::foo(__impl) } }
Instead of
The macro should instead work with:
which would expand to: