Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(decl_macro)]
- macro foo() {
- // This identifier has a fresh hygiene scope local to
- // *each invocation* of `foo!`.
- // vvv
- macro bar() {}
- bar!();
- }
- // No collisions between these two definitions and
- // invocations of `bar!`.
- foo!();
- foo!();
- // Uncomment to see a 'cannot find macro `bar!` in this scope' error.
- //bar!();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement