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