diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/issue-15524.rs | 24 | ||||
| -rw-r--r-- | src/test/compile-fail/tag-variant-disr-dup.rs | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/test/compile-fail/issue-15524.rs b/src/test/compile-fail/issue-15524.rs new file mode 100644 index 00000000000..1e7bd6fc623 --- /dev/null +++ b/src/test/compile-fail/issue-15524.rs @@ -0,0 +1,24 @@ +// Copyright 2014 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. + +static N: int = 1; + +enum Foo { + A = 1, + B = 1, //~ ERROR discriminant value `1` already exists + //~^^ NOTE conflicting + C = 0, + D, //~ ERROR discriminant value `1` already exists + //~^^^^^ NOTE conflicting + E = N, //~ ERROR discriminant value `1` already exists + //~^^^^^^^ NOTE conflicting +} + +fn main() {} diff --git a/src/test/compile-fail/tag-variant-disr-dup.rs b/src/test/compile-fail/tag-variant-disr-dup.rs index d0608ec4c19..5da5bb85409 100644 --- a/src/test/compile-fail/tag-variant-disr-dup.rs +++ b/src/test/compile-fail/tag-variant-disr-dup.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//error-pattern:discriminant value already exists +//error-pattern:discriminant value // black and white have the same discriminator value ... |
