rust/tests/ui/proc-macro/signature.stderr

37 lines
1.3 KiB
Plaintext

error: proc macro functions may not be `extern "C"`
--> $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`
|
= 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
error: aborting due to 5 previous errors