Replace option.map(cond) == Some(true) with option.is_some_and(cond)#118253
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 25, 2023
Merged
Replace option.map(cond) == Some(true) with option.is_some_and(cond)#118253bors merged 1 commit intorust-lang:masterfrom
option.map(cond) == Some(true) with option.is_some_and(cond)#118253bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
Some changes occurred in src/tools/rust-analyzer cc @rust-lang/rust-analyzer Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
Member
|
If these aren't strictly required to build rustc, we prefer merging any changes upstream (in rust-analyzer) first. |
This was referenced Nov 24, 2023
Merged
bors
added a commit
to rust-lang/rust-analyzer
that referenced
this pull request
Nov 24, 2023
Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)` Extracted from rust-lang/rust#118253.
Member
Author
|
Sounds good. I have moved the src/tools/rust-analyzer change to rust-lang/rust-analyzer#15960. I have also created #118255 to make rustbot inform PR authors about this preference. |
Member
|
My purview is rustdoc only. |
Contributor
|
r? compiler-errors @bors r+ rollup |
Collaborator
fmease
added a commit
to fmease/rust
that referenced
this pull request
Nov 25, 2023
…rk-Simulacrum Request that rust-analyzer changes are sent upstream first if possible This automates `@lnicola's` comment rust-lang#118253 (comment). Rustbot will write a comment similar to rust-lang#116743 (comment).
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 25, 2023
Rollup of 9 pull requests Successful merges: - rust-lang#118220 (general improvements/fixes on bootstrap) - rust-lang#118251 (rustdoc-search: avoid infinite where clause unbox) - rust-lang#118253 (Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`) - rust-lang#118255 (Request that rust-analyzer changes are sent upstream first if possible) - rust-lang#118259 (Move EagerResolution to rustc_infer::infer::resolve) - rust-lang#118262 (Relate Inherent Associated Types using eq) - rust-lang#118266 (Move stuff around on `stable_mir` and `rustc_smir` crate) - rust-lang#118271 (Separate `NaN`/`Inf` floats with `_`) - rust-lang#118274 (Fix smir's `Ty::Ref` pretty printing) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 25, 2023
Rollup merge of rust-lang#118255 - dtolnay:mentionsrustanalyzer, r=Mark-Simulacrum Request that rust-analyzer changes are sent upstream first if possible This automates `@lnicola's` comment rust-lang#118253 (comment). Rustbot will write a comment similar to rust-lang#116743 (comment).
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 25, 2023
Rollup merge of rust-lang#118253 - dtolnay:issomeand, r=compiler-errors Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)` Requested by `@fmease` in rust-lang#118226 (review). There is also a much larger number of `option.map_or(false, cond)` that can be changed separately if someone wants. r? fmease
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by @fmease in #118226 (review).
There is also a much larger number of
option.map_or(false, cond)that can be changed separately if someone wants.r? fmease