what I have:
pub struct Foo<T> {
_t: PhantomData<T>,
}
pub struct Bar<T> {
_t: PhantomData<T>,
}
pub struct Cat<T> {
_t: PhantomData<T>,
}
pub struct Dog<T> {
_t: PhantomData<T>,
}
pub struct A {}
pub struct B {}
pub struct C {}
pub struct D {}
pub struct E {}
pub struct F {}
pub struct G {}
pub struct H {}
pub enum Foo_E {
A(Foo<A>),
B(Foo<B>),
C(Foo<C>),
D(Foo<D>),
E(Foo<E>),
F(Foo<F>),
G(Foo<G>),
H(Foo<H>),
}
pub enum Bar_E {
A(Bar<A>),
B(Bar<B>),
C(Bar<C>),
D(Bar<D>),
E(Bar<E>),
F(Bar<F>),
G(Bar<G>),
H(Bar<H>),
}
pub enum Cat_E {
A(Cat<A>),
B(Cat<B>),
C(Cat<C>),
D(Cat<D>),
E(Cat<E>),
F(Cat<F>),
G(Cat<G>),
H(Cat<H>),
}
pub enum Dog_E {
A(Dog<A>),
B(Dog<B>),
C(Dog<C>),
D(Dog<D>),
E(Dog<E>),
F(Dog<F>),
G(Dog<G>),
H(Dog<H>),
}
what I want to write:
pub enum Does_Not_Compile<T> {
A(T<A>),
B(T<B>),
C(T<C>),
D(T<D>),
E(T<E>),
F(T<F>),
G(T<G>),
H(T<H>),
}
type Foo_E = Does_Not_Compile<Foo>;
type Bar_E = Does_Not_Compile<Bar>;
type Cat_E = Does_Not_Compile<Cat>;
type Dog_E = Does_Not_Compile<Dog>;
In A<B>
we can define things here B is generic; is there anyway to define things where the A is generic ?