mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
12 lines
249 B
Rust
12 lines
249 B
Rust
// force-host
|
|
// no-prefer-dynamic
|
|
|
|
#![crate_type = "proc-macro"]
|
|
|
|
extern crate proc_macro;
|
|
|
|
#[proc_macro_derive(A)]
|
|
pub fn derive_a(_: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
|
"fn f() { println!(\"{}\", foo); }".parse().unwrap()
|
|
}
|