Skip to content

Commit 8e708ed

Browse files
Villossephilberty
authored andcommitted
gccrs: fixes previously added tests
Fixes previously added tests. Fixes #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 <lenny.chiadmi-delage@epita.fr>
1 parent 5b5fe17 commit 8e708ed

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

gcc/testsuite/rust/compile/issue-4140-1.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ pub struct B<T>(T);
66

77
macro_rules! ty_app {
88
($_a:pat) => {
9-
ApplicationTy($ctor) // { dg-error "unexpected token '$' in typle struct items" "4140" { target *-*-* } . }
10-
// { dg-error "failed to parse typle struct items" "4140" { target *-*-*} .-1 }
9+
ApplicationTy($ctor) // { dg-error "unexpected token" }
10+
// { dg-error "failed to parse tuple struct items" "" { target *-*-* } .-1 }
1111
};
1212
}
1313

14-
pub fn foo(ty: ApplicationTy) { // { dg-error "could not resolve type path 'ApplicationTy'" "4140" { target *-*-* } .-1 }
14+
pub fn foo(ty: ApplicationTy) { // { dg-error "could not resolve type path 'ApplicationTy'" }
1515
match ty {
1616
ty_app!(bean::Array) => {}
1717
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
macro_rules! ty_app {
22
($_a:pat) => {
3-
($ctor) // { dg-error "unrecognised token '$' in grouped or tuple pattern after first pattern" "4140" { target *-*-* } . }
3+
($ctor)
44
};
55
}
66

77
pub fn foo() {
8-
match ty { // { dg-error "Cannot find path 'ty' in this scope" "4140" { target *-*-* } .-1 }
9-
ty_app!(bean::Array) => {}
8+
match ty {
9+
// { dg-error "Cannot find path" "4140" { target *-*-* } 0 }
10+
ty_app!(bean::Array) => {} // { dg-error "unrecognised token" "4140" { target *-*-* } 0 }
1011
}
1112
}

0 commit comments

Comments
 (0)