gccrs: Handle `async` functions in traits
[official-gcc.git] / gcc / testsuite / rust / compile / macro-issue1400-2.rs
blobba7b61b0b16632d0af2ebdb752f3d8aaca24b378
1 macro_rules! foo {
2     ( ( $( $Trait: ident ),+ ) for $($Ty: ident)* ) => {
3         $(
4             impl $Trait for $Ty {
5     // { dg-error "different amount of matches used in merged repetitions: expected 4, got 1" "" { target *-*-* } .-1 }
6                 fn bar() -> i32 {
7                     14
8                 }
9             }
10         )+
11     }
14 trait Foo {
15     fn bar() -> i32;
18 trait Bar {
19     fn bar() -> i32;
22 trait Baz {
23     fn bar() -> i32;
26 trait Qux {
27     fn bar() -> i32;
30 struct S;
32 foo! {(Foo, Bar, Baz, Qux) for S}