-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
T-langRelevant to the language teamRelevant to the language team
Description
Currently Hash
is only implemented for thin pointers, and Eq
/PartialEq
aren't implemented for any pointers (but ==
works for all pointers).
All of these traits should be implemented for all pointers.
Without this, it's impossible to implement generic reference-equality semantics that support dynamically sized types, even in unsafe code, thanks to #27570. Even with #27570 it will still be impossible to do safely on stable rust, since raw::TraitObject
is unstable, and even if it were stable, the type system isn't powerful enough to express when to use raw::TraitObject
vs a thin pointer.
Fixing this properly will likely require improvements to the type system. Any improvement which solves rust-lang/rfcs#1279 should be enough.
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language teamRelevant to the language team