sourcegen/
lib.rs

1extern crate proc_macro;
2
3/// Does nothing (returns item as-is). Needed to remove the attribute that is handled by source generator.
4#[proc_macro_attribute]
5pub fn sourcegen(
6    _attrs: proc_macro::TokenStream,
7    item: proc_macro::TokenStream,
8) -> proc_macro::TokenStream {
9    item
10}
11
12#[proc_macro_attribute]
13pub fn generated(
14    _attrs: proc_macro::TokenStream,
15    item: proc_macro::TokenStream,
16) -> proc_macro::TokenStream {
17    item
18}