Skip to content

use slice::contains where applicable #139057

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

Merged
merged 1 commit into from
Mar 29, 2025
Merged

Conversation

yotamofek
Copy link
Contributor

Applies the manual_contains clippy lint, plus some small drive-bys.

@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
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 A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 28, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 28, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs

cc @jdonszelmann

excluded_cargo_defaults = true;
} else {
result.push(a.to_string());
match ICE_REPORT_COMPILER_FLAGS_STRIP_VALUE.iter().find(|s| option == **s) {
Copy link
Contributor Author

@yotamofek yotamofek Mar 28, 2025

Choose a reason for hiding this comment

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

this was written very weirdly... uses the result of find() instead of option

@wesleywiser
Copy link
Member

Nice cleanups @yotamofek!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 28, 2025

📌 Commit 9ef35dd has been approved by wesleywiser

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 28, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 29, 2025
…leywiser

use `slice::contains` where applicable

Applies the [`manual_contains`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains) clippy lint, plus some small drive-bys.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138832 (Start using `with_native_path` in `std::sys::fs`)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 29, 2025
…leywiser

use `slice::contains` where applicable

Applies the [`manual_contains`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains) clippy lint, plus some small drive-bys.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)
 - rust-lang#139097 (Add more tests for pin!().)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b5ad69b into rust-lang:master Mar 29, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Mar 29, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup merge of rust-lang#139057 - yotamofek:pr/slice-contains, r=wesleywiser

use `slice::contains` where applicable

Applies the [`manual_contains`](https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains) clippy lint, plus some small drive-bys.
@yotamofek yotamofek deleted the pr/slice-contains branch April 4, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants