rust/tests/ui/match/postfix-match/pf-match-chain.rs
Ross Smyth 68a58f255a Add postfix-match experimental feature
Co-authored-by: Josh Stone <jistone@redhat.com>
2024-03-05 23:34:45 -05:00

17 lines
250 B
Rust

//@ run-pass
#![feature(postfix_match)]
fn main() {
1.match {
2 => Some(0),
_ => None,
}.match {
None => Ok(true),
Some(_) => Err("nope")
}.match {
Ok(_) => (),
Err(_) => panic!()
}
}