rust/tests/ui/mir/early-otherwise-branch-ice.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
482 B
Rust
Raw Permalink Normal View History

2024-09-24 03:56:41 -05:00
// 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 => {}
}
}