mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
37 lines
1.3 KiB
Plaintext
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
|
|
|