rust/tests/ui/proc-macro/auxiliary/api/mod.rs

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

25 lines
433 B
Rust
Raw Normal View History

// 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)]
#![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
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();
TokenStream::new()
}