rust/src/test/ui/binding/fat-arrow-match.rs
2019-07-27 18:56:16 +03:00

18 lines
262 B
Rust

// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
enum color {
red,
green,
blue
}
pub fn main() {
println!("{}", match color::red {
color::red => { 1 }
color::green => { 2 }
color::blue => { 3 }
});
}