Un-export test suite macros

Eliminates a clippy lint:

    error: `crate` references the macro call's crate
      --> tests/macros/mod.rs:40:21
       |
    40 |         let $expr = crate::macros::Tokens::parse::<$t>($expr).unwrap();
       |                     ^^^^^ help: to reference the macro definition's crate, use: `$crate`
       |
       = note: `-D clippy::crate-in-macro-def` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def
This commit is contained in:
David Tolnay 2022-04-09 00:41:20 -07:00
parent 13bf252482
commit 9fd668c666
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -1,9 +1,10 @@
#![allow(unused_macros)]
#[path = "../debug/mod.rs"]
pub mod debug;
use syn::parse::{Parse, Result};
#[macro_export]
macro_rules! errorf {
($($tt:tt)*) => {{
use ::std::io::Write;
@ -12,7 +13,6 @@ macro_rules! errorf {
}};
}
#[macro_export]
macro_rules! punctuated {
($($e:expr,)+) => {{
let mut seq = ::syn::punctuated::Punctuated::new();
@ -27,14 +27,12 @@ macro_rules! punctuated {
};
}
#[macro_export]
macro_rules! snapshot {
($($args:tt)*) => {
snapshot_impl!(() $($args)*)
};
}
#[macro_export]
macro_rules! snapshot_impl {
(($expr:ident) as $t:ty, @$snapshot:literal) => {
let $expr = crate::macros::Tokens::parse::<$t>($expr).unwrap();