Closed
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.