I was pondering the bitwise-ness of
Copy, and this got me thinking about
Eq, where one way to allow more things in patterns would be to require that they're bitwise-comparable for
Eq. But I think that the only way that could be sound at the aggregate level (as opposed to field-by-field) would be if it contained no
undef, which I think is one of the markers you're pondering here as a requirement for safe
Hmm, trying to find the attribute for it got me to https://github.com/rust-lang/rust/issues/63438 (which removed said attribute), which has some similar thoughts in it.
So you want to match on two values being equal without them being the same type?
I was thinking more of being able to
memcmp them (of the same type) instead of needing to
Eq::eq, like how
Copy lets me
memcpy instead of