Skip to content

Commit

Permalink
Add regression test for rust-lang#130769
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyouxu committed Sep 24, 2024
1 parent 16a0266 commit ad7eb48
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/ui/mir/early-otherwise-branch-ice.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Changes in https://github.com/rust-lang/rust/pull/129047 lead to several mir-opt ICE regressions,
// this test is added to make sure this does not regress.

//@ compile-flags: -C opt-level=3
//@ check-pass

#![crate_type = "lib"]

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 => {}
}
}

0 comments on commit ad7eb48

Please sign in to comment.