rust/tests/incremental/auxiliary/incremental_proc_macro_aux.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
374 B
Rust
Raw Normal View History

//@ force-host
//@ 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()
}