2018-11-24 07:34:13 -06:00
|
|
|
//@ force-host
|
2018-01-16 12:31:15 -06:00
|
|
|
//@ no-prefer-dynamic
|
|
|
|
|
|
|
|
#![crate_type = "proc-macro"]
|
|
|
|
|
|
|
|
extern crate proc_macro;
|
|
|
|
|
|
|
|
use proc_macro::TokenStream;
|
|
|
|
|
|
|
|
// Add a function to shift DefIndex of registrar function
|
|
|
|
#[cfg(cfail2)]
|
|
|
|
fn foo() {}
|
|
|
|
|
|
|
|
#[proc_macro_derive(IncrementalMacro)]
|
|
|
|
pub fn derive(input: TokenStream) -> TokenStream {
|
|
|
|
#[cfg(cfail2)]
|
|
|
|
{
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
"".parse().unwrap()
|
|
|
|
}
|