Skip to content

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

Closed
@scottmcm

Description

@scottmcm

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.)

Metadata

Metadata

Assignees

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-rustdocRelevant to the rustdoc 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