From: "lenny.chiadmi-delage" <[email protected]>

As the issue as been resolved, i just added the test from the issue.

Fixes Rust-GCC/gccrs#1081

gcc/testsuite/ChangeLog:

        * rust/compile/issue-1081.rs: New test.

Signed-off-by: lenny.chiadmi-delage <[email protected]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/3d11639f2af90367cd9749ade7ad6e23ff8ce124

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4366

 gcc/testsuite/rust/compile/issue-1081.rs | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/issue-1081.rs

diff --git a/gcc/testsuite/rust/compile/issue-1081.rs 
b/gcc/testsuite/rust/compile/issue-1081.rs
new file mode 100644
index 000000000..09daf7814
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-1081.rs
@@ -0,0 +1,13 @@
+// { dg-additional-options "-w" }
+enum Foo {
+    A,
+    B,
+}
+
+fn inspect(f: Foo, g: u8) {
+    match (f, g) {
+        (Foo::A, 1) => {}
+        (Foo::B, 2) => {}
+        _ => {}
+    }
+}

base-commit: 6f92d797c5991cadbd2de5992cfa69740fb5abac
-- 
2.52.0

Reply via email to