Derive Macro frame_support::EqNoBound

source ยท
#[derive(EqNoBound)]
Expand description

Derive Eq but do not bound any generic.

This is useful for type generic over runtime:

trait Config {
		type C: Eq;
}

// Foo implements [`Eq`] because `C` bounds [`Eq`].
// Otherwise compilation will fail with an output telling `c` doesn't implement [`Eq`].
#[derive(PartialEqNoBound, EqNoBound)]
struct Foo<T: Config> {
		c: T::C,
}

DeriveEq but do no bound any generic.

Docs at frame_support::EqNoBound.