From a78d58ba5658e10132ca27db6854344cf592fd3d Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Fri, 3 Mar 2023 12:19:52 +0000 Subject: [PATCH] Add note about hygienic macros (#472) * Add note about hygienic macros * Fix typo. * Add link about macro hygiene. --- src/hello-world.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hello-world.md b/src/hello-world.md index f030d57a..e1c94f51 100644 --- a/src/hello-world.md +++ b/src/hello-world.md @@ -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). +