Guest User

Untitled

a guest
Sep 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #![feature(decl_macro)]
  2.  
  3. mod foo {
  4. pub macro import_bar($name:ident) {
  5. use bar::time_travel as $name;
  6. }
  7. }
  8.  
  9. mod bar {
  10. pub macro time_travel($name:ident) {
  11. use foo::import_bar as $name;
  12. }
  13. }
  14.  
  15. use foo::*;
  16.  
  17. import_bar!(m2);
  18. m2!(import_bar);
Add Comment
Please, Sign In to add comment