mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
18 lines
263 B
Rust
18 lines
263 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 }
|
|
});
|
|
}
|