Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Possible alternative for missing type equality in rust trait impl's
trait F<V,X> {}
struct D;
trait TheV2 {
type IsThis;
impl<V1,V2> TheV2 for F<V1,V2> {
type IsThis = V2;
impl<V1,V2> F<V1,V2> for D where
//V1==V2 // not implemented in compiler
F<V1,V2>: TheV2<IsThis=V1> // alternative!?
fn main() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.