summaryrefslogtreecommitdiffstats
path: root/tests/run-make/rustc-macro-dep-files/foo.rs
blob: 00b1c26d43f10d152b62899ddf812fa8307142a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![crate_type = "proc-macro"]

extern crate proc_macro;

use proc_macro::TokenStream;

#[proc_macro_derive(A)]
pub fn derive(input: TokenStream) -> TokenStream {
    let input = input.to_string();
    assert!(input.contains("struct A;"));
    "struct B;".parse().unwrap()
}