blob: c13f384fa3ae14a9474ad57a3ca6c8adc182d62c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// compile-flags: --test
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro]
pub fn mac(input: TokenStream) -> TokenStream { loop {} }
#[cfg(test)]
mod test {
#[test]
fn t() { crate::mac!(A) }
//~^ ERROR can't use a procedural macro from the same crate that defines it
//~| HELP you can define integration tests in a directory named `tests`
}
|