Skip to content

fn() Trait Implementations documentation no longer correct #119903

Description

@asquared31415

Location

https://doc.rust-lang.org/nightly/std/primitive.fn.html#trait-implementations-1

Summary

The documentation on the primitive fn() says that

Due to a temporary restriction in Rust’s type system, these traits are only implemented on functions that take 12 arguments or less, with the "Rust" and "C" ABIs. In the future, this may change:

This is no longer the case, the traits are implemented for all function pointer types, even on stable. I assume this just needs a documentation update, but the fact that this is such a big change makes me hesitant to do it myself without confirming.

playground example

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions