From f64fb10bc87bb4b5a5291d09364ad6c725a842d8 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 11 May 2015 19:00:27 -0700 Subject: [PATCH] feat(header): export __hyper__tm! macro so test modules work with header! --- src/header/common/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/header/common/mod.rs b/src/header/common/mod.rs index 553ba7832a..feba590922 100644 --- a/src/header/common/mod.rs +++ b/src/header/common/mod.rs @@ -98,7 +98,8 @@ macro_rules! deref( } ); -macro_rules! tm { +#[macro_export] +macro_rules! __hyper__tm { ($id:ident, $tm:ident{$($tf:item)*}) => { #[allow(unused_imports)] mod $tm{ @@ -285,7 +286,7 @@ macro_rules! header { ($id, $n) => ($item)* } - tm! { $id, $tm { $($tf)* }} + __hyper__tm! { $id, $tm { $($tf)* }} }; ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)+ $tm:ident{$($tf:item)*}) => { header! { @@ -293,7 +294,7 @@ macro_rules! header { ($id, $n) => ($item)+ } - tm! { $id, $tm { $($tf)* }} + __hyper__tm! { $id, $tm { $($tf)* }} }; ($(#[$a:meta])*($id:ident, $n:expr) => [$item:ty] $tm:ident{$($tf:item)*}) => { header! { @@ -301,7 +302,7 @@ macro_rules! header { ($id, $n) => [$item] } - tm! { $id, $tm { $($tf)* }} + __hyper__tm! { $id, $tm { $($tf)* }} }; ($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+} $tm:ident{$($tf:item)*}) => { header! { @@ -309,7 +310,7 @@ macro_rules! header { ($id, $n) => {Any / ($item)+} } - tm! { $id, $tm { $($tf)* }} + __hyper__tm! { $id, $tm { $($tf)* }} }; }