about summary refs log tree commit diff
path: root/tests/ui/match/postfix-match/pf-match-chain.rs
blob: 80546e1963bb60373559f5ae7ee00aa39a6c483e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ run-pass

#![feature(postfix_match)]

fn main() {
    1.match {
        2 => Some(0),
        _ => None,
    }.match {
        None => Ok(true),
        Some(_) => Err("nope")
    }.match {
        Ok(_) => (),
        Err(_) => panic!()
    }
}