mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
9 lines
178 B
Rust
9 lines
178 B
Rust
extern crate proc_macro;
|
|
|
|
use proc_macro::TokenStream;
|
|
|
|
#[proc_macro_derive(A)]
|
|
pub fn derive_a(_input: TokenStream) -> TokenStream {
|
|
"struct A { inner }".parse().unwrap()
|
|
}
|