postfix-match

postfix-match adds the feature for matching upon values postfix the expressions that generate the values.

#![allow(unused)]
#![feature(postfix_match)]

fn main() {
enum Foo {
    Bar,
    Baz
}

fn get_foo() -> Foo {
    Foo::Bar
}

get_foo().match {
    Foo::Bar => {},
    Foo::Baz => panic!(),
}
}