Skip to content

Commit

Permalink
runtime: use renaming to better contain the traverse macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Apr 5, 2019
1 parent 8833b48 commit 65131ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,10 @@ pub mod nd {
}

// HACK(eddyb) work around `macro_rules` not being `use`-able.
pub use crate::traverse;
pub use crate::__runtime_traverse as traverse;

#[macro_export]
macro_rules! traverse {
macro_rules! __runtime_traverse {
(typeof($leaf:ty) _) => { $leaf };
(typeof($leaf:ty) ?) => { Option<traverse!(typeof($leaf) _)> };
(typeof($leaf:ty) ($l_shape:tt, $r_shape:tt)) => { (traverse!(typeof($leaf) $l_shape), traverse!(typeof($leaf) $r_shape)) };
Expand Down

0 comments on commit 65131ec

Please sign in to comment.