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

Function types have no primitive page in docs #17104

Closed
45ujksy5l03jcvf opened this issue Sep 8, 2014 · 7 comments
Closed

Function types have no primitive page in docs #17104

45ujksy5l03jcvf opened this issue Sep 8, 2014 · 7 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@45ujksy5l03jcvf
Copy link

Similar to #15318 and #15654

@steveklabnik steveklabnik changed the title Function types have no primitive page in rustdoc Function types have no primitive page in docs Jan 27, 2015
@steveklabnik
Copy link
Member

@alexcrichton @huonw how do I make this happen? is this another 'dummy module' thing?

@alexcrichton
Copy link
Member

It would likely require modifying code somewhere around here and adding a dummy (private) module or declaring another one as #![doc(primitive = "fn")]

@steveklabnik steveklabnik added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed A-docs labels Mar 31, 2015
@steveklabnik
Copy link
Member

Triage: no change

@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum Mark-Simulacrum added C-feature-request Category: A feature request, i.e: not implemented / a PR. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools and removed T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. labels Jul 22, 2017
@QuietMisdreavus
Copy link
Member

Adding a page for function pointers as a whole (under some general name fn or the like) is a small enough change, but unless i've missed something, there are no impl blocks anywhere that could be picked up for that page. It's the curse of variadic generics, but unlike arrays and tuples, there are no stock impls for function pointer types up to a certain arity. Is a nearly-empty page (save for the doc(primitive) block that creates the page in the first place) acceptable?

cc @rust-lang/docs: What do we want to display for documentation on function pointers as a whole? I have a short blurb that mainly just links to the Fn* traits, and a note that function pointers are Copy, so far, but do we have anything else to add?

@petrochenkov
Copy link
Contributor

@QuietMisdreavus

unlike arrays and tuples, there are no stock impls for function pointer types up to a certain arity.

// Impls for function pointers

@QuietMisdreavus
Copy link
Member

On second thought, i'll just upload what i have and let that discussion happen there. The PR to add this is #43529.

@QuietMisdreavus
Copy link
Member

@petrochenkov I stand corrected. I'll start working that in, then. Thanks!

bors added a commit that referenced this issue Aug 1, 2017
add documentation for function pointers as a primitive

This PR adds a new kind of primitive to the standard library documentation: Function pointers. It's useful to be able to discuss them separately from closure-trait-objects, and to have something to point to when discussing function pointers as a *type* and not a *trait*.

Fixes #17104
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
…rsion-of-node-in-metrics-yml, r=lnicola

fix: usage of `deprecated` version of `Node.js`

fixes rust-lang#17103.
lnicola pushed a commit to lnicola/rust that referenced this issue Apr 20, 2024
…rsion-of-node-in-metrics-yml, r=lnicola

fix: usage of `deprecated` version of `Node.js`

fixes rust-lang#17103.
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 C-feature-request Category: A feature request, i.e: not implemented / a PR. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants