rust/tests/ui/proc-macro/signature.rs
2023-01-11 09:32:08 +00:00

14 lines
302 B
Rust

// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
#![allow(warnings)]
extern crate proc_macro;
#[proc_macro_derive(A)]
pub unsafe extern "C" fn foo(a: i32, b: u32) -> u32 {
//~^ ERROR: expected a `Fn<(proc_macro::TokenStream,)>` closure, found `unsafe extern "C" fn
loop {}
}