# Macro hygiene and the guides

**URL:** <https://internals.rust-lang.org/t/macro-hygiene-and-the-guides/1207>\
**Category:** guidelines\
**Created:** [January 6, 2015, 8:47pm UTC](https://internals.rust-lang.org/t/macro-hygiene-and-the-guides/1207 "2015-01-06T20:47:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![d3zd3z](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/d3zd3z/32/511_2.png) [@d3zd3z](https://internals.rust-lang.org/u/d3zd3z)\
**Post date:** [January 6, 2015, 8:47pm UTC](https://internals.rust-lang.org/t/macro-hygiene-and-the-guides/1207/1 "2015-01-06T20:47:04Z")

</div>

According to [http://doc.rust-lang.org/guide-macros.html#hygiene](http://doc.rust-lang.org/guide-macros.html#hygiene), macros have hygiene, but [https://github.com/rust-lang/rust/issues/19700](https://github.com/rust-lang/rust/issues/19700) indicates that they are only hygienic for `let` names.

I’m guessing fixing this will come after 1.0, but should we fix the hygiene section in the guide [http://doc.rust-lang.org/guide-macros.html#hygiene](http://doc.rust-lang.org/guide-macros.html#hygiene) to at least explain the limitations of the current implementation?

I’ve been bitten by this when trying to work around it by using full paths to refer to the name, but discovering that the path isn’t the same inside the module as it is when used in other modules. See [https://github.com/d3zd3z/macromod](https://github.com/d3zd3z/macromod) for a kind of minimized example.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [January 6, 2015, 9:12pm UTC](https://internals.rust-lang.org/t/macro-hygiene-and-the-guides/1207/2 "2015-01-06T21:12:49Z")

</div>

I’ve been waiting on reform to land before I redid these docs. PRs very welcome.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [March 25, 2019, 8:23am UTC](https://internals.rust-lang.org/t/macro-hygiene-and-the-guides/1207/3 "2019-03-25T08:23:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
