# Scoping and macro import/export
-Macros occupy a single global namespace. The interaction with Rust's system of
-modules and crates is somewhat complex.
+Macros are expanded at an early stage in compilation, before name resolution.
+One downside is that scoping works differently for macros, compared to other
+constructs in the language.
Definition and expansion of macros both happen in a single depth-first,
lexical-order traversal of a crate's source. So a macro defined at module scope
is visible to any subsequent code in the same module, which includes the body
of any subsequent child `mod` items.
+A macro defined within the body of a single `fn`, or anywhere else not at
+module scope, is visible only within that item.
+
If a module has the `macro_use` attribute, its macros are also visible in its
parent module after the child's `mod` item. If the parent also has `macro_use`
then the macros will be visible in the grandparent after the parent's `mod`