https://gcc.gnu.org/g:a9598bd3581b9349ccfe83e338fb18dbfd1aa1d1
commit r16-5595-ga9598bd3581b9349ccfe83e338fb18dbfd1aa1d1 Author: lenny.chiadmi-delage <[email protected]> Date: Wed Nov 12 10:10:54 2025 +0000 gccrs: fixes previously added tests Fixes previously added tests. Fixes Rust-GCC#4140 gcc/testsuite/ChangeLog: * rust/compile/issue-4140-1.rs: Fixes test. * rust/compile/issue-4140-2.rs: Likewise. Signed-off-by: lenny.chiadmi-delage <[email protected]> Diff: --- gcc/testsuite/rust/compile/issue-4140-1.rs | 6 +++--- gcc/testsuite/rust/compile/issue-4140-2.rs | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/rust/compile/issue-4140-1.rs b/gcc/testsuite/rust/compile/issue-4140-1.rs index 48aa98bc318c..8b68b3e2d8b5 100644 --- a/gcc/testsuite/rust/compile/issue-4140-1.rs +++ b/gcc/testsuite/rust/compile/issue-4140-1.rs @@ -6,12 +6,12 @@ pub struct B<T>(T); macro_rules! ty_app { ($_a:pat) => { - ApplicationTy($ctor) // { dg-error "unexpected token '$' in typle struct items" "4140" { target *-*-* } . } - // { dg-error "failed to parse typle struct items" "4140" { target *-*-*} .-1 } + ApplicationTy($ctor) // { dg-error "unexpected token" } + // { dg-error "failed to parse tuple struct items" "" { target *-*-* } .-1 } }; } -pub fn foo(ty: ApplicationTy) { // { dg-error "could not resolve type path 'ApplicationTy'" "4140" { target *-*-* } .-1 } +pub fn foo(ty: ApplicationTy) { // { dg-error "could not resolve type path 'ApplicationTy'" } match ty { ty_app!(bean::Array) => {} } diff --git a/gcc/testsuite/rust/compile/issue-4140-2.rs b/gcc/testsuite/rust/compile/issue-4140-2.rs index 507cf2aba389..bcccddb3329e 100644 --- a/gcc/testsuite/rust/compile/issue-4140-2.rs +++ b/gcc/testsuite/rust/compile/issue-4140-2.rs @@ -1,11 +1,12 @@ macro_rules! ty_app { ($_a:pat) => { - ($ctor) // { dg-error "unrecognised token '$' in grouped or tuple pattern after first pattern" "4140" { target *-*-* } . } + ($ctor) }; } pub fn foo() { - match ty { // { dg-error "Cannot find path 'ty' in this scope" "4140" { target *-*-* } .-1 } - ty_app!(bean::Array) => {} + match ty { + // { dg-error "Cannot find path" "4140" { target *-*-* } 0 } + ty_app!(bean::Array) => {} // { dg-error "unrecognised token" "4140" { target *-*-* } 0 } } }
