-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
I'd expect function pointers (fn() with all combinations of safety and ABI) to implement roughly the same set of traits as raw pointers, namely:
PartialEq, Eq, Clone, PartialOrd, Ord, Hash, fmt::Pointer, Debug
Currently Clone is implemented for safe and unsafe function pointers, but all the ABIs except for "Rust" and "C" are ignored, i.e. a paradoxical situation takes place - extern "rare_abi" fn() is Copy, but not Clone (Edit: and it causes ICEs).
PartialEq is implemented only for safe function pointers with "C" ABI.
All the other traits are not implemented.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.