Skip to content

Commit 3c94954

Browse files
committed
Establish new test for shared discriminant
gcc/testsuite/ChangeLog: * rust/compile/shared_discriminator_enum.rs: New test.
1 parent 9e6d06e commit 3c94954

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// from issue 3351: https://github.com/Rust-GCC/gccrs/issues/3351
2+
enum Foo { // { dg-error "discriminant value `1` assigned more than once" }
3+
Bar = 1, // { dg-error "`1` assigned here" }
4+
Qaz = 1, // { dg-error "`1` assigned here" }
5+
}
6+
7+
fn main() {}

0 commit comments

Comments
 (0)