SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #[macro_export]
  2. macro_rules! separator {
  3.     ($($x:tt)*) => { "/" };
  4. }
  5.  
  6. #[macro_export]
  7. macro_rules! concat_separator {
  8.     ( $e:literal, $($other:literal),+ ) => {
  9.         ($e, $crate::separator!(), $crate::concat_separator!($($other),+))
  10.     };
  11.     ( $e:literal ) => {
  12.         $e
  13.     }
  14. }
  15.  
  16. fn main() {
  17.     println!("{:?}", concat_separator!(2, 3,4))
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top