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

Add Option::is_some_with and Result::is_{ok,err}_with #93051

Merged
merged 5 commits into from
Jan 19, 2022

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Jan 18, 2022

@m-ou-se 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
@rust-highfive
Copy link
Collaborator

r? @dtolnay

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 18, 2022
@yaahc
Copy link
Member

yaahc commented Jan 18, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jan 18, 2022

📌 Commit 45dee47 has been approved by yaahc

@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 Jan 18, 2022
@m-ou-se m-ou-se assigned yaahc and unassigned dtolnay Jan 18, 2022
@rust-log-analyzer

This comment has been minimized.

@m-ou-se
Copy link
Member Author

m-ou-se commented Jan 18, 2022

@bors r=yaahc

@bors
Copy link
Contributor

bors commented Jan 18, 2022

📌 Commit 5fee3e7 has been approved by yaahc

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 bors merged commit d5bc168 into rust-lang:master Jan 19, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 19, 2022
@m-ou-se m-ou-se deleted the is-some-with branch January 22, 2022 17:15
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants