rust/tests/ui/proc-macro/auxiliary/issue-38586.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
249 B
Rust
Raw Normal View History

2017-01-02 20:11:32 -06:00
// 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()
}