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

37 lines
1.3 KiB
Plaintext
Raw Normal View History

error: proc macro functions may not be `extern "C"`
2018-12-25 15:56:47 +00:00
--> $DIR/signature.rs:10:1
2017-12-10 21:00:10 +00:00
|
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
2017-12-10 21:00:10 +00:00
|
LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
| ^^^^^^ found unexpected argument
2017-12-10 21:00:10 +00:00
error: aborting due to 5 previous errors
2017-12-10 21:00:10 +00:00