Location
https://doc.rust-lang.org/nightly/std/primitive.fn.html#trait-implementations-1
Summary
we now implement all of these traits for all function pointers. We should change the documentation to mention that.
we may also want to add a dummy impl for rustdoc for https://doc.rust-lang.org/nightly/std/marker/trait.FnPtr.html, similar to
|
// Fake impl that's only really used for docs. |
|
#[cfg(doc)] |
|
#[stable(feature = "rust1", since = "1.0.0")] |
|
#[doc(fake_variadic)] |
|
/// This trait is implemented on function pointers with any number of arguments. |
|
impl<Ret, T> Clone for fn(T) -> Ret { |
|
fn clone(&self) -> Self { |
|
loop {} |
|
} |
|
} |
Location
https://doc.rust-lang.org/nightly/std/primitive.fn.html#trait-implementations-1
Summary
we now implement all of these traits for all function pointers. We should change the documentation to mention that.
we may also want to add a dummy impl for rustdoc for https://doc.rust-lang.org/nightly/std/marker/trait.FnPtr.html, similar to
rust/library/core/src/primitive_docs.rs
Lines 1574 to 1583 in 6f8c055