From f87f99dd5aab4505b77ee0fe84420e12e02dea0e Mon Sep 17 00:00:00 2001 From: Oli Lalonde Date: Tue, 12 Jul 2022 04:02:29 -0400 Subject: [PATCH] Mention attribute like macros in attributes.md --- src/attribute.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/attribute.md b/src/attribute.md index 13b0a60b46..dcb7d6c1a2 100644 --- a/src/attribute.md +++ b/src/attribute.md @@ -12,6 +12,7 @@ can be used to/for: * link to a foreign library * mark functions as unit tests * mark functions that will be part of a benchmark +* [attribute like macros][macros] When attributes apply to a whole crate, their syntax is `#![crate_attribute]`, and when they apply to a module or item, the syntax is `#[item_attribute]` @@ -36,3 +37,4 @@ Attributes can have multiple values and can be separated over multiple lines, to [cfg]: attribute/cfg.md [crate]: attribute/crate.md [lint]: https://en.wikipedia.org/wiki/Lint_%28software%29 +[macros]: https://doc.rust-lang.org/book/ch19-06-macros.html#attribute-like-macros