summaryrefslogtreecommitdiffstats
path: root/tests/incremental/auxiliary/incremental_proc_macro_aux.rs
blob: 6961450b43462989cac2a182eca4f73fe25ce5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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()
}