summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/proc-macro-abi.rs
blob: 93a613e8b8fc3e794020854f6a37c5da6dcda506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// force-host
// no-prefer-dynamic

#![crate_type = "proc-macro"]
#![allow(warnings)]

extern crate proc_macro;
use proc_macro::TokenStream;

#[proc_macro]
pub extern "C" fn abi(a: TokenStream) -> TokenStream {
    //~^ ERROR function-like proc macro has incorrect signature
    a
}

#[proc_macro]
pub extern "system" fn abi2(a: TokenStream) -> TokenStream {
    //~^ ERROR function-like proc macro has incorrect signature
    a
}

#[proc_macro]
pub extern fn abi3(a: TokenStream) -> TokenStream {
    //~^ ERROR function-like proc macro has incorrect signature
    a
}

#[proc_macro]
pub extern "Rust" fn abi4(a: TokenStream) -> TokenStream {
    a
}