diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2015-06-04 00:39:35 +0900 |
|---|---|---|
| committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2015-06-17 21:37:36 +0900 |
| commit | ae0716d96264b34b3b85ecceccf7b5e722ca9a3c (patch) | |
| tree | c61ec12dcd7244bd7e993a6367433f17feccaacb | |
| parent | 5af8b5f72b6cafc4cbe88e449cd53fefbc54c34d (diff) | |
| download | rust-ae0716d96264b34b3b85ecceccf7b5e722ca9a3c.tar.gz rust-ae0716d96264b34b3b85ecceccf7b5e722ca9a3c.zip | |
Add a test
| -rw-r--r-- | src/test/run-pass/lint-dead-code-variant.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/run-pass/lint-dead-code-variant.rs b/src/test/run-pass/lint-dead-code-variant.rs new file mode 100644 index 00000000000..074c69d8708 --- /dev/null +++ b/src/test/run-pass/lint-dead-code-variant.rs @@ -0,0 +1,22 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![deny(dead_code)] + +enum Foo { + A, + B, +} + +pub fn main() { + match Foo::A { + Foo::A | Foo::B => Foo::B + }; +} |
