-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add Option::is_some_with and Result::is_{ok,err}_with #93051
Merged
Merged
Conversation
This file contains 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
m-ou-se
added
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
A-result-option
Area: Result and Option combinators
labels
Jan 18, 2022
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jan 18, 2022
8 tasks
@bors r+ |
📌 Commit 45dee47 has been approved by |
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
Jan 18, 2022
This comment has been minimized.
This comment has been minimized.
@bors r=yaahc |
📌 Commit 5fee3e7 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 19, 2022
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#88642 (Formally implement let chains) - rust-lang#89621 (doc: guarantee call order for sort_by_cached_key) - rust-lang#91278 (Use iterator instead of recursion in `codegen_place`) - rust-lang#92124 (Little improves in CString `new` when creating from slice) - rust-lang#92783 (Annotate dead code lint with notes about ignored derived impls) - rust-lang#92797 (Remove horizontal lines at top of page) - rust-lang#92920 (Move expr- and item-related pretty printing functions to modules) - rust-lang#93041 (Remove some unused ordering derivations based on `DefId`) - rust-lang#93051 (Add Option::is_some_with and Result::is_{ok,err}_with) - rust-lang#93062 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 28, 2023
Drop unstable `Option::contains`, `Result::contains`, `Result::contains_err` This is a proposal to drop the three functions `Option::contains`, `Result::contains` and `Result::contains_err`. The discovery of `Option::is_some_with`/`Result::is_ok_with`/`Result::is_err_with` in rust-lang#93051 obviates the need for these methods (non-stabilization tracked in rust-lang#62358). An additional benefit of change is that it avoids spurious error messages in IDEs, when `contains` is supplied by a third-party library: ![option-result-unstable](https://user-images.githubusercontent.com/42493/219127961-13cb559e-6ee8-4449-8dc9-d28d07270ad5.png)
oli-obk
pushed a commit
to oli-obk/miri
that referenced
this pull request
Apr 4, 2023
Drop unstable `Option::contains`, `Result::contains`, `Result::contains_err` This is a proposal to drop the three functions `Option::contains`, `Result::contains` and `Result::contains_err`. The discovery of `Option::is_some_with`/`Result::is_ok_with`/`Result::is_err_with` in rust-lang/rust#93051 obviates the need for these methods (non-stabilization tracked in rust-lang/rust#62358). An additional benefit of change is that it avoids spurious error messages in IDEs, when `contains` is supplied by a third-party library: ![option-result-unstable](https://user-images.githubusercontent.com/42493/219127961-13cb559e-6ee8-4449-8dc9-d28d07270ad5.png)
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this pull request
Jun 1, 2023
Drop unstable `Option::contains`, `Result::contains`, `Result::contains_err` This is a proposal to drop the three functions `Option::contains`, `Result::contains` and `Result::contains_err`. The discovery of `Option::is_some_with`/`Result::is_ok_with`/`Result::is_err_with` in rust-lang/rust#93051 obviates the need for these methods (non-stabilization tracked in rust-lang/rust#62358). An additional benefit of change is that it avoids spurious error messages in IDEs, when `contains` is supplied by a third-party library: ![option-result-unstable](https://user-images.githubusercontent.com/42493/219127961-13cb559e-6ee8-4449-8dc9-d28d07270ad5.png)
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 20, 2024
Drop unstable `Option::contains`, `Result::contains`, `Result::contains_err` This is a proposal to drop the three functions `Option::contains`, `Result::contains` and `Result::contains_err`. The discovery of `Option::is_some_with`/`Result::is_ok_with`/`Result::is_err_with` in rust-lang/rust#93051 obviates the need for these methods (non-stabilization tracked in rust-lang/rust#62358). An additional benefit of change is that it avoids spurious error messages in IDEs, when `contains` is supplied by a third-party library: ![option-result-unstable](https://user-images.githubusercontent.com/42493/219127961-13cb559e-6ee8-4449-8dc9-d28d07270ad5.png)
RalfJung
pushed a commit
to RalfJung/rust-analyzer
that referenced
this pull request
Apr 27, 2024
Drop unstable `Option::contains`, `Result::contains`, `Result::contains_err` This is a proposal to drop the three functions `Option::contains`, `Result::contains` and `Result::contains_err`. The discovery of `Option::is_some_with`/`Result::is_ok_with`/`Result::is_err_with` in rust-lang/rust#93051 obviates the need for these methods (non-stabilization tracked in rust-lang/rust#62358). An additional benefit of change is that it avoids spurious error messages in IDEs, when `contains` is supplied by a third-party library: ![option-result-unstable](https://user-images.githubusercontent.com/42493/219127961-13cb559e-6ee8-4449-8dc9-d28d07270ad5.png)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-result-option
Area: Result and Option combinators
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
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.
See #62358 (comment)