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

rustdoc: get rid of extra line when line-wrapping fn decls with empty arg list #113013

Merged

Conversation

fmease
Copy link
Member

@fmease fmease commented Jun 24, 2023

Fixes bevyengine/bevy#8898 (comment):

Screenshot 2023-06-24 at 23-42-53 any_with_component in bevy_ecs schedule common_conditions - Rust

It now prints as shown below (which conforms to the style guide):

pub fn any_with_component<T: Component>(
) -> impl FnMut(Query<'_, '_, (), With<T>>) -> bool + Clone

The bug was introduced in #109011.

@rustbot
Copy link
Collaborator

rustbot commented Jun 24, 2023

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 24, 2023
pub struct Padding00000000000000000000000000000000000000000000000000000000000000000000000000000000;

// @has 'decl_line_wrapping_empty_arg_list/fn.create.html'
// @snapshot decl - '//pre[@class="rust item-decl"]'
Copy link
Member Author

@fmease fmease Jun 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using @snapshot instead of @has since I couldn't figure out if it was possible to test for the presence of line breaks with it (I love the Htmldocck DSL ^^).

Copy link
Member

@camelid camelid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@camelid
Copy link
Member

camelid commented Jun 25, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 25, 2023

📌 Commit d23c334 has been approved by camelid

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 25, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 25, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#112976 (Add test for futures with HRTB)
 - rust-lang#113013 (rustdoc: get rid of extra line when line-wrapping fn decls with empty arg list)
 - rust-lang#113030 (Add a regression test for rust-lang#109071)
 - rust-lang#113031 (Add a regression test for rust-lang#110933)
 - rust-lang#113036 (Accept `ReStatic` for RPITIT)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 32995d8 into rust-lang:master Jun 26, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 26, 2023
@fmease fmease deleted the rustdoc-decl-line-wrapping-slim-arg-list branch June 26, 2023 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function signature of resource_equals differs from implementation in docs
5 participants