2021-04-29 13:10:14 -05:00
|
|
|
// force-host
|
|
|
|
// no-prefer-dynamic
|
|
|
|
|
|
|
|
#![crate_type = "proc-macro"]
|
|
|
|
#![crate_name = "proc_macro_api_tests"]
|
2021-04-29 13:17:44 -05:00
|
|
|
#![feature(proc_macro_span)]
|
2021-04-29 13:10:14 -05:00
|
|
|
#![deny(dead_code)] // catch if a test function is never called
|
|
|
|
|
|
|
|
extern crate proc_macro;
|
|
|
|
|
2021-04-29 13:17:44 -05:00
|
|
|
mod cmp;
|
2021-04-29 14:03:35 -05:00
|
|
|
mod parse;
|
2021-04-29 13:17:44 -05:00
|
|
|
|
2021-04-29 13:10:14 -05:00
|
|
|
use proc_macro::TokenStream;
|
|
|
|
|
|
|
|
#[proc_macro]
|
|
|
|
pub fn run(input: TokenStream) -> TokenStream {
|
|
|
|
assert!(input.is_empty());
|
2021-04-29 14:03:35 -05:00
|
|
|
|
2021-04-29 13:17:44 -05:00
|
|
|
cmp::test();
|
2021-04-29 14:03:35 -05:00
|
|
|
parse::test();
|
|
|
|
|
2021-04-29 13:10:14 -05:00
|
|
|
TokenStream::new()
|
|
|
|
}
|