Skip to content

Include trailing commas in wrapped function declarations [RustDoc] #125901

New issue

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

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

Already on GitHub? # to your account

Closed
scottmcm opened this issue Jun 2, 2024 · 1 comment · Fixed by #125946
Closed

Include trailing commas in wrapped function declarations [RustDoc] #125901

scottmcm opened this issue Jun 2, 2024 · 1 comment · Fixed by #125946
Assignees
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@scottmcm
Copy link
Member

scottmcm commented Jun 2, 2024

Take a look at the docs for mir::Visitor: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/visit/trait.Visitor.html#method.visit_local

Rustdoc is making good choices for whether to wrap the declarations
image

But when it wraps, it doesn't include a trailing comma on the last parameter.

I think it should, because the default style guide wants a comma there.

(And rustdoc should continue not putting a trailing comma when the declaration is shown as a single line.)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 2, 2024
@Noratrieb Noratrieb added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 2, 2024
@fmease fmease added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Jun 2, 2024
@Sergi-Ferrez
Copy link
Contributor

@rustbot claim

@bors bors closed this as completed in 532aa9a Jun 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 4, 2024
Rollup merge of rust-lang#125946 - Sergi-Ferrez:master, r=notriddle,fmease

Include trailing commas in wrapped function declarations [RustDoc]

Fixes rust-lang#125901.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants