[COMMITTED 15/19] gccrs: testsuite: Add a testcase for issue 4159
arthur.cohen@embecosm.com
arthur.cohen@embecosm.com
Mon Jun 1 13:40:53 GMT 2026
From: Harishankar <harishankarpp7@gmail.com>
gcc/testsuite/ChangeLog:
* rust/compile/issue-4159.rs: New test
Signed-off-by: Harishankar <harishankarpp7@gmail.com>
---
gcc/testsuite/rust/compile/issue-4159.rs | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/issue-4159.rs
diff --git a/gcc/testsuite/rust/compile/issue-4159.rs b/gcc/testsuite/rust/compile/issue-4159.rs
new file mode 100644
index 00000000000..cac69a48a39
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-4159.rs
@@ -0,0 +1,12 @@
+#![feature(no_core)]
+#![no_core]
+#![feature()]
+macro_rules! m {
+ () => ( c.. ); // { dg-error "token type .* cannot be parsed as range pattern bound" }
+}
+fn main() {
+ match [1, 1, 2] {
+ [ c1 ] => {}
+ [ m!() ] => {}
+ }
+}
\ No newline at end of file
--
2.50.1
More information about the Gcc-rust
mailing list