Remix.run Logo
pornel 3 days ago

This doesn't solve the hashtable problem:

    Crate A implements Hash(vA) for T
    Crate B implements Hash(vB) for T
    Crate C has a global HashSet<T>
    Crates A and B can both put their T instance in the C::HashSet. They can do it in their private code. Their Hash overrides any external implementation. The trait is used, but not exported.
    C::HashSet now has an inconsistent state. Boom!