-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove unstable Result::into_ok_or_err #100604
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
.into_ok_or_err(), | ||
}, | ||
) { | ||
ControlFlow::Break(node) | ControlFlow::Continue(node) => node, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am more sympathetic to a ControlFlow<T, T> -> T
conversion method than I am to Result<T, T> -> T
. It's a bad sign that the original code here was an abuse of Result
to begin with.
FWIW in my own code this would be:
Self::Seq(elts) => {
let mut pruned = Tree::unit();
for elt in elts {
pruned = match elt.prune(f) {
uninhabited if uninhabited == Tree::uninhabited() => {
return Tree::uninhabited();
}
inhabited => pruned.then(inhabited),
};
}
pruned
}
CI failure: 🤷 but every PR opened within the past 4 hours is failing the same way. |
@bors r+ |
Remove unstable Result::into_ok_or_err Pending FCP: rust-lang#82223 (comment) `@rustbot` label +waiting-on-fcp
Remove unstable Result::into_ok_or_err Pending FCP: rust-lang#82223 (comment) ``@rustbot`` label +waiting-on-fcp
Rollup of 8 pull requests Successful merges: - rust-lang#99064 (distinguish the method and associated function diagnostic information) - rust-lang#99920 (Custom allocator support in `rustc_serialize`) - rust-lang#100034 ( Elaborate all box dereferences in `ElaborateBoxDerefs`) - rust-lang#100076 (make slice::{split_at,split_at_unchecked} const functions) - rust-lang#100604 (Remove unstable Result::into_ok_or_err) - rust-lang#100933 (Reduce code size of `assert_matches_failed`) - rust-lang#100978 (Handle `Err` in `ast::LitKind::to_token_lit`.) - rust-lang#101010 (rustdoc: remove unused CSS for `.multi-column`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Summary: Added `fbcode` symlinks for `platform010` & `platform010-aarch64` and addressed the following fixes: * Account for stabilized [`#![feature(backtrace)]`](rust-lang/rust#99573) and [`#![feature(generic_associated_types)]`](rust-lang/rust#99573) * Account for removal of [`#![feature(result_into_ok_or_err)]`](rust-lang/rust#100604) * Account for migration of [`std::io::ReadBuf` to `std::io::BorrowBuf|BorrowCursor`](rust-lang/rust#97015) * Account for [`Error` trait move into core](rust-lang/rust#99917) * Account for `#[warn(non_camel_case_types)]` * Various function signature, lifetime requirement changes and lint fixes Test Plan: ``` cd ~/fbcode buckify_tp2 ./common/rust/tools/scripts/check_all.sh fbcode -- --local-only ``` Reviewed By: zertosh Differential Revision: D40923615 fbshipit-source-id: f7ac2828d74edeae39aae517172207b0ee998a59
Remove unstable Result::into_ok_or_err Pending FCP: rust-lang#82223 (comment) ```@rustbot``` label +waiting-on-fcp
Pending FCP: #82223 (comment)
@rustbot label +waiting-on-fcp