Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #130775 - jieyouxu:revert-129047, r=nagisa
Revert "Apply EarlyOtherwiseBranch to scalar value #129047" This reverts PR #129047, commit a772336fb3fbd1fe4493077fcfe04e0221296a99, reversing changes made to 702987f75b74f789ba227ee04a3d7bb1680c2309. cc `@DianQK` and `@cjgillot` as the PR author and reviewer of #129047 respectively. It seems [Apply EarlyOtherwiseBranch to scalar value #129047](rust-lang/rust#129047) may have lead to several nightly regressions: - rust-lang/rust#130769 - rust-lang/rust#130774 - rust-lang/rust#130771 Example test that would ICE with changes in #129047 (this test is included in this PR): ```rs //@ compile-flags: -C opt-level=3 //@ check-pass use std::task::Poll; pub fn poll(val: Poll<Result<Option<Vec<u8>>, u8>>) { match val { Poll::Ready(Ok(Some(_trailers))) => {} Poll::Ready(Err(_err)) => {} Poll::Ready(Ok(None)) => {} Poll::Pending => {} } } ``` Since this is a mir-opt ICE that seems to quite easy to trigger with real-world crates being affected, let's revert for now and reland the mir-opt after these are fixed.
- Loading branch information