diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/incremental/auxiliary/issue-49482-macro-def.rs | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/incremental/auxiliary/issue-49482-macro-def.rs')
-rw-r--r-- | src/test/incremental/auxiliary/issue-49482-macro-def.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/incremental/auxiliary/issue-49482-macro-def.rs b/src/test/incremental/auxiliary/issue-49482-macro-def.rs new file mode 100644 index 000000000..bfa7abb1a --- /dev/null +++ b/src/test/incremental/auxiliary/issue-49482-macro-def.rs @@ -0,0 +1,40 @@ +// force-host +// no-prefer-dynamic + +#![crate_type="proc-macro"] +#![allow(non_snake_case)] + +extern crate proc_macro; + +macro_rules! proc_macro_expr_impl { + ($( + $( #[$attr:meta] )* + pub fn $func:ident($input:ident: &str) -> String; + )+) => { + $( + $( #[$attr] )* + #[proc_macro_derive($func)] + pub fn $func(_input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStream { + panic!() + } + )+ + }; +} + +proc_macro_expr_impl! { + pub fn f1(input: &str) -> String; + pub fn f2(input: &str) -> String; + pub fn f3(input: &str) -> String; + pub fn f4(input: &str) -> String; + pub fn f5(input: &str) -> String; + pub fn f6(input: &str) -> String; + pub fn f7(input: &str) -> String; + pub fn f8(input: &str) -> String; + pub fn f9(input: &str) -> String; + pub fn fA(input: &str) -> String; + pub fn fB(input: &str) -> String; + pub fn fC(input: &str) -> String; + pub fn fD(input: &str) -> String; + pub fn fE(input: &str) -> String; + pub fn fF(input: &str) -> String; +} |