mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
29 lines
609 B
Rust
29 lines
609 B
Rust
#![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 proc macro functions may not be `extern "C"`
|
|
a
|
|
}
|
|
|
|
#[proc_macro]
|
|
pub extern "system" fn abi2(a: TokenStream) -> TokenStream {
|
|
//~^ ERROR proc macro functions may not be `extern "system"`
|
|
a
|
|
}
|
|
|
|
#[proc_macro]
|
|
pub extern fn abi3(a: TokenStream) -> TokenStream {
|
|
//~^ ERROR proc macro functions may not be `extern "C"`
|
|
a
|
|
}
|
|
|
|
#[proc_macro]
|
|
pub extern "Rust" fn abi4(a: TokenStream) -> TokenStream {
|
|
a
|
|
}
|