Adds new test.
Fixes Rust-GCC/gccrs#1210
gcc/testsuite/ChangeLog:
* rust/compile/issue-1210.rs: New test.
Signed-off-by: lenny.chiadmi-delage <lenny.chiadmi-delage@epita.fr>
--- /dev/null
+enum E {
+ One,
+ Two,
+ Other
+}
+
+fn foo (x: E) -> i32 {
+ let mut y = 0;
+
+ match x {
+ E::One => {
+ y = 1, // { dg-error "expected .;. or .\}. after expression, found .,." "" {target *-*-*} 0 }
+ }
+ E::Two => {
+ y = 2;
+ }
+ _ => {}
+ }
+
+ return y;
+}
+
+fn main () {
+ let x = E::One;
+ let y = foo (x);
+}