]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/signature.stderr
Rollup merge of #107532 - compiler-errors:erase-regions-in-uninhabited, r=jackh726
[rust.git] / tests / ui / proc-macro / signature.stderr
1 error: proc macro functions may not be `extern "C"`
2   --> $DIR/signature.rs:10:1
3    |
4 LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
7 error: proc macro functions may not be `unsafe`
8   --> $DIR/signature.rs:10:1
9    |
10 LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
11    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: mismatched derive proc macro signature
14   --> $DIR/signature.rs:10:49
15    |
16 LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
17    |                                                 ^^^ found u32, expected type `proc_macro::TokenStream`
18    |
19    = note: derive proc macros must have a signature of `fn(TokenStream) -> TokenStream`
20
21 error: mismatched derive proc macro signature
22   --> $DIR/signature.rs:10:33
23    |
24 LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
25    |                                 ^^^ found i32, expected type `proc_macro::TokenStream`
26    |
27    = note: derive proc macros must have a signature of `fn(TokenStream) -> TokenStream`
28
29 error: mismatched derive proc macro signature
30   --> $DIR/signature.rs:10:38
31    |
32 LL | pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
33    |                                      ^^^^^^ found unexpected argument
34
35 error: aborting due to 5 previous errors
36