1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-24 16:42:36 +02:00

Add note about hygienic macros (#472)

* Add note about hygienic macros

* Fix typo.

* Add link about macro hygiene.
This commit is contained in:
Andrew Walbran 2023-03-03 12:19:52 +00:00 committed by GitHub
parent 449ead5575
commit a78d58ba56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,4 +33,8 @@ Key points:
* Rust uses macros for situations where you want to have a variable number of
arguments (no function [overloading](basic-syntax/functions-interlude.md)).
* Macros being 'hygienic' means they don't accidentally capture identifiers from
the scope they are used in. Rust macros are actually only
[partially hygenic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html).
</details>