diff options
Diffstat (limited to 'src/test/ui/binding/fat-arrow-match.rs')
-rw-r--r-- | src/test/ui/binding/fat-arrow-match.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/binding/fat-arrow-match.rs b/src/test/ui/binding/fat-arrow-match.rs new file mode 100644 index 000000000..aaf5be8cf --- /dev/null +++ b/src/test/ui/binding/fat-arrow-match.rs @@ -0,0 +1,17 @@ +// 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 } + }); +} |