rust/tests/ui-toml/nonstandard_macro_braces/auxiliary/proc_macro_derive.rs
2023-06-26 14:13:07 +00:00

14 lines
317 B
Rust

extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive(DeriveSomething)]
pub fn derive(_: TokenStream) -> TokenStream {
"fn _f() -> Vec<u8> { vec![] }".parse().unwrap()
}
#[proc_macro]
pub fn foo_bar(_: TokenStream) -> TokenStream {
"fn issue_7422() { eprintln!(); }".parse().unwrap()
}