2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_camel_case_types)]
|
2012-06-04 18:56:50 -07:00
|
|
|
|
|
|
|
enum color {
|
|
|
|
red,
|
|
|
|
green,
|
|
|
|
blue
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2014-11-06 00:05:53 -08:00
|
|
|
println!("{}", match color::red {
|
2015-01-25 22:05:03 +01:00
|
|
|
color::red => { 1 }
|
|
|
|
color::green => { 2 }
|
|
|
|
color::blue => { 3 }
|
2012-06-04 18:56:50 -07:00
|
|
|
});
|
|
|
|
}
|