Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fn() Trait Implementations documentation no longer correct #119903

Closed
asquared31415 opened this issue Jan 12, 2024 · 2 comments · Fixed by #119907
Closed

fn() Trait Implementations documentation no longer correct #119903

asquared31415 opened this issue Jan 12, 2024 · 2 comments · Fixed by #119907
Assignees
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@asquared31415
Copy link
Contributor

asquared31415 commented Jan 12, 2024

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

@asquared31415 asquared31415 added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Jan 12, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 12, 2024
@Noratrieb 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
@Noratrieb
Copy link
Member

#108080
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1700-2023-06-01

This was FCPed, so the docs just need to be fixed.

@asquared31415
Copy link
Contributor Author

Alright, then I'll go ahead and put that up!
@rustbot claim

@bors bors closed this as completed in 48ba721 Jan 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 19, 2024
Rollup merge of rust-lang#119907 - asquared31415:fn_trait_docs, r=Nilstrieb

Update `fn()` trait implementation docs

Fixes rust-lang#119903

This was FCP'd and approved for the 1.70.0 release, this is just a docs update to match that change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants