Let's consider this example:
trait Foo {}
trait Bar: Foo {}
// Let's say this macro generate:
// impl Foo for Qux {}
// impl Bar for Qux {}
#[derive(Foo, Bar)]
struct Qux;
If Foo
is not implemented, Is there any way to implement both trait just by adding #[derive(Bar)]
?
Are there any hacks?