target_test_dir_macro/
lib.rs

1//! The macro implementation for `target-test-dir`
2//!
3//! Use the `target-test-dir` crate rather than this, which has runtime support as well as complete docs.
4
5mod procmacro;
6
7use proc_macro::TokenStream;
8
9/// Provide a `get_test_dir` macro within the body of the annotated function
10///
11/// This macro must be used via the `target-test-dir` crate, rather than directly from
12/// [target-test-dir-macro]. The usage documentation lives in `target-test-dir`.
13#[proc_macro_attribute]
14pub fn with_test_dir(_args: TokenStream, input: TokenStream) -> TokenStream {
15    // TODO: parse _args.
16
17    self::procmacro::transform_with_test_dir(input)
18}