summaryrefslogtreecommitdiffstats
path: root/tests/run-make/rustc-macro-dep-files/foo.rs
blob: 66db1a21736659d15fd909df19c8a9e4b22f23b0 (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()
}