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

librustdoc: flatten nested ifs #138090

Merged
merged 1 commit into from
Mar 7, 2025
Merged

Conversation

yotamofek
Copy link
Contributor

@yotamofek yotamofek commented Mar 6, 2025

Some minor cosmetic improvements (IMHO) found while working on something else.
But reviewed with no whitespace.

@rustbot
Copy link
Collaborator

rustbot commented Mar 6, 2025

r? @fmease

rustbot has assigned @fmease.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Mar 6, 2025
@yotamofek yotamofek force-pushed the pr/rustdoc/flatten-ifs branch from 7df44af to fde3733 Compare March 6, 2025 08:16
}
} else {
None
if let ty::ClauseKind::Projection(proj) = bound.kind().skip_binder()
Copy link
Member

Choose a reason for hiding this comment

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

That could even be a clippy lint. :3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is. Not sure why it didn't fire. (I did run clippy on librustdoc, and didn't see a warning on this)
https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
(Also, clippy-fix-PR coming soon)

Copy link
Member

Choose a reason for hiding this comment

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

Awesome, thanks!

@GuillaumeGomez
Copy link
Member

Thanks for the cleanup!

r=me once CI pass.

@bors delegate=yotamofek

@bors
Copy link
Contributor

bors commented Mar 6, 2025

✌️ @yotamofek, you can now approve this pull request!

If @GuillaumeGomez told you to "r=me" after making some further change, please make that change, then do @bors r=@GuillaumeGomez

@yotamofek
Copy link
Contributor Author

@bors r=@GuillaumeGomez

Only 6 hours for the CI to run 😁

@bors
Copy link
Contributor

bors commented Mar 6, 2025

📌 Commit fde3733 has been approved by GuillaumeGomez

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 Mar 6, 2025
@yotamofek
Copy link
Contributor Author

I think this should probably be rolled up...
@bors rollup=always

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
…mpiler-errors

Rollup of 17 pull requests

Successful merges:

 - rust-lang#137827 (Add timestamp to unstable feature usage metrics)
 - rust-lang#138041 (bootstrap and compiletest: Use `size_of_val` from the prelude instead of imported)
 - rust-lang#138046 (trim channel value in `get_closest_merge_commit`)
 - rust-lang#138053 (Increase the max. custom try jobs requested to `20`)
 - rust-lang#138061 (triagebot: add a `compiler_leads` ad-hoc group)
 - rust-lang#138064 (Remove - from xtensa targets cpu names)
 - rust-lang#138075 (Use final path segment for diagnostic)
 - rust-lang#138078 (Reduce the noise of bootstrap changelog warnings in --dry-run mode)
 - rust-lang#138081 (Move `yield` expressions behind their own feature gate)
 - rust-lang#138090 (`librustdoc`: flatten nested ifs)
 - rust-lang#138092 (Re-add `DynSend` and `DynSync` impls for `TyCtxt`)
 - rust-lang#138094 (a small borrowck cleanup)
 - rust-lang#138098 (Stabilize feature `const_copy_from_slice`)
 - rust-lang#138103 (Git ignore citool's target directory)
 - rust-lang#138105 (Fix broken link to Miri intrinsics in documentation)
 - rust-lang#138108 (Mention me (WaffleLapkin) when changes to `rustc_codegen_ssa` occur)
 - rust-lang#138117 ([llvm/PassWrapper] use `size_t` when building arg strings)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 184c2b0 into rust-lang:master Mar 7, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 7, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
Rollup merge of rust-lang#138090 - yotamofek:pr/rustdoc/flatten-ifs, r=GuillaumeGomez

`librustdoc`: flatten nested ifs

Some minor cosmetic improvements (IMHO) found while working on something else.
But reviewed with [no whitespace](https://github.com/rust-lang/rust/pull/138090/files?diff=unified&w=1).
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 7, 2025
…llaumeGomez

`librustdoc`: clippy fixes

First commit is all machine-generated fixes,
next two are some more lints fixed by hand/misc. cleanups

Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment))

r? `@GuillaumeGomez`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 7, 2025
…llaumeGomez

`librustdoc`: clippy fixes

First commit is all machine-generated fixes,
next two are some more lints fixed by hand/misc. cleanups

Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment))

r? ``@GuillaumeGomez``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 7, 2025
…llaumeGomez

`librustdoc`: clippy fixes

First commit is all machine-generated fixes,
next two are some more lints fixed by hand/misc. cleanups

Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment))

r? ```@GuillaumeGomez```
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 7, 2025
Rollup merge of rust-lang#138107 - yotamofek:pr/rustdoc/clippy, r=GuillaumeGomez

`librustdoc`: clippy fixes

First commit is all machine-generated fixes,
next two are some more lints fixed by hand/misc. cleanups

Inspired by the redundant `.and_then()` added in rust-lang#137320 , and [this comment](rust-lang#138090 (comment))

r? ```@GuillaumeGomez```
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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants