rust/tests/ui/match/postfix-match/pf-match-chain.rs

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

17 lines
250 B
Rust
Raw Normal View History

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