You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Noratrieb
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Jan 12, 2024
Rollup merge of rust-lang#119907 - asquared31415:fn_trait_docs, r=Nilstrieb
Update `fn()` trait implementation docs
Fixesrust-lang#119903
This was FCP'd and approved for the 1.70.0 release, this is just a docs update to match that change.
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.
Location
https://doc.rust-lang.org/nightly/std/primitive.fn.html#trait-implementations-1
Summary
The documentation on the primitive
fn()
says thatThis 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
The text was updated successfully, but these errors were encountered: