summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/signature.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/proc-macro/signature.stderr35
1 files changed, 5 insertions, 30 deletions
diff --git a/tests/ui/proc-macro/signature.stderr b/tests/ui/proc-macro/signature.stderr
index 3dbe3f22a..ba5c8c157 100644
--- a/tests/ui/proc-macro/signature.stderr
+++ b/tests/ui/proc-macro/signature.stderr
@@ -1,36 +1,11 @@
-error: proc macro functions may not be `extern "C"`
+error: derive proc macro has incorrect signature
--> $DIR/signature.rs:10:1
|
LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: proc macro functions may not be `unsafe`
- --> $DIR/signature.rs:10:1
- |
-LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: mismatched derive proc macro signature
- --> $DIR/signature.rs:10:49
- |
-LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
- | ^^^ found u32, expected type `proc_macro::TokenStream`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected normal fn, found unsafe fn
|
- = note: derive proc macros must have a signature of `fn(TokenStream) -> TokenStream`
-
-error: mismatched derive proc macro signature
- --> $DIR/signature.rs:10:33
- |
-LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
- | ^^^ found i32, expected type `proc_macro::TokenStream`
- |
- = note: derive proc macros must have a signature of `fn(TokenStream) -> TokenStream`
-
-error: mismatched derive proc macro signature
- --> $DIR/signature.rs:10:38
- |
-LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
- | ^^^^^^ found unexpected argument
+ = note: expected signature `fn(proc_macro::TokenStream) -> proc_macro::TokenStream`
+ found signature `unsafe extern "C" fn(i32, u32) -> u32`
-error: aborting due to 5 previous errors
+error: aborting due to previous error