Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. macro_rules! expand {
  2. (
  3. #[foo]
  4. $(#[$attr:meta])*
  5. pub fn foo() {}
  6. ) => (
  7. expand! {
  8. $(#[$attr])*
  9. pub fn foo() {}
  10. }
  11. );
  12.  
  13. (
  14. #[bar($a:meta)]
  15. pub fn foo() {}
  16. ) => (
  17. expand! {
  18. pub fn foo() {}
  19. }
  20. );
  21.  
  22. (
  23. pub fn foo() {}
  24. ) => (
  25. pub fn foo() {}
  26. )
  27. }
  28.  
  29. expand! {
  30. #[foo]
  31. #[bar(a)]
  32. pub fn foo() {}
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement