]> git.lizzy.rs Git - rust.git/blob - tests/incremental/auxiliary/incremental_proc_macro_aux.rs
Rollup merge of #107323 - JakobDegen:const-goto, r=tmiasko
[rust.git] / tests / incremental / auxiliary / incremental_proc_macro_aux.rs
1 // force-host
2 // no-prefer-dynamic
3
4 #![crate_type = "proc-macro"]
5
6 extern crate proc_macro;
7
8 use proc_macro::TokenStream;
9
10 // Add a function to shift DefIndex of registrar function
11 #[cfg(cfail2)]
12 fn foo() {}
13
14 #[proc_macro_derive(IncrementalMacro)]
15 pub fn derive(input: TokenStream) -> TokenStream {
16     #[cfg(cfail2)]
17     {
18         foo();
19     }
20
21     "".parse().unwrap()
22 }