Include trailing commas in wrapped function declarations [RustDoc] #125901
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.
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_localRustdoc is making good choices for whether to wrap the declarations
![image](https://private-user-images.githubusercontent.com/18526288/335894317-6e95bc7b-5d11-410a-b476-ae711409a67c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjg4NTIsIm5iZiI6MTczOTM2ODU1MiwicGF0aCI6Ii8xODUyNjI4OC8zMzU4OTQzMTctNmU5NWJjN2ItNWQxMS00MTBhLWI0NzYtYWU3MTE0MDlhNjdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEzNTU1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhNGNjZjZlNTdlZDRiYmQ4OWJkNTcwNzEyZmEzYTdmNjdhMjE1NDI2YjZjNTg2M2RmNjVmYTFmY2I2OWQxYzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.NY3kGJxHm5CZ0__ltNP6L791bFA6ztLUNZ07wGwWSQQ)
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.)
The text was updated successfully, but these errors were encountered: