Skip to content

Commit c6d588b

Browse files
ehusstraviscross
authored andcommitted
Rename "Attribute macros" section
This renames this section to follow the attribute template. Although I like the old title, since it describes what it does, I would prefer to not make exceptions and stay consistent.
1 parent 5bf7161 commit c6d588b

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

book.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ use-boolean-and = true
3434
"/items/traits.html#object-safety" = "traits.html#dyn-compatibility"
3535
"/lifetime-elision.html#static-lifetime-elision" = "lifetime-elision.html#const-and-static-elision"
3636
"/macros-by-example.html#path-based-scope" = "macros-by-example.html#the-macro_export-attribute"
37+
"/procedural-macros.html#attribute-macros" = "procedural-macros.html#the-proc_macro_attribute-attribute"
3738
"/procedural-macros.html#derive-macros" = "procedural-macros.html#the-proc_macro_derive-attribute"
3839
"/procedural-macros.html#function-like-procedural-macros" = "procedural-macros.html#the-proc_macro-attribute"
3940
"/runtime.html#the-panic_handler-attribute" = "panic.html#the-panic_handler-attribute"

src/attributes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ The following is an index of all built-in attributes.
372372
[`non_exhaustive`]: attributes/type_system.md#the-non_exhaustive-attribute
373373
[`panic_handler`]: panic.md#the-panic_handler-attribute
374374
[`path`]: items/modules.md#the-path-attribute
375-
[`proc_macro_attribute`]: procedural-macros.md#attribute-macros
375+
[`proc_macro_attribute`]: procedural-macros.md#the-proc_macro_attribute-attribute
376376
[`proc_macro_derive`]: macro.proc.derive
377377
[`proc_macro`]: procedural-macros.md#the-proc_macro-attribute
378378
[`recursion_limit`]: attributes/limits.md#the-recursion_limit-attribute
@@ -385,7 +385,7 @@ The following is an index of all built-in attributes.
385385
[`used`]: abi.md#the-used-attribute
386386
[`warn`]: attributes/diagnostics.md#lint-check-attributes
387387
[`windows_subsystem`]: runtime.md#the-windows_subsystem-attribute
388-
[attribute macros]: procedural-macros.md#attribute-macros
388+
[attribute macros]: procedural-macros.md#the-proc_macro_attribute-attribute
389389
[block expressions]: expressions/block-expr.md
390390
[built-in attributes]: #built-in-attributes-index
391391
[derive macro helper attributes]: procedural-macros.md#derive-macro-helper-attributes

src/items/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ fn foo_oof(#[some_inert_attribute] arg: u8) {
472472
[`cfg`]: ../conditional-compilation.md#the-cfg-attribute
473473
[`cfg_attr`]: ../conditional-compilation.md#the-cfg_attr-attribute
474474
[lint check attributes]: ../attributes/diagnostics.md#lint-check-attributes
475-
[procedural macro attributes]: ../procedural-macros.md#attribute-macros
475+
[procedural macro attributes]: macro.proc.attribute
476476
[testing attributes]: ../attributes/testing.md
477477
[`cold`]: ../attributes/codegen.md#the-cold-attribute
478478
[`inline`]: ../attributes/codegen.md#the-inline-attribute

src/names/namespaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ It is still an error for a [`use` import] to shadow another macro, regardless of
134134
[Associated const declarations]: ../items/associated-items.md#associated-constants
135135
[Associated function declarations]: ../items/associated-items.md#associated-functions-and-methods
136136
[Associated type declarations]: ../items/associated-items.md#associated-types
137-
[Attribute macros]: ../procedural-macros.md#attribute-macros
137+
[Attribute macros]: ../procedural-macros.md#the-proc_macro_attribute-attribute
138138
[attributes]: ../attributes.md
139139
[bang-style macros]: ../macros.md
140140
[Block labels]: ../expressions/loop-expr.md#labelled-block-expressions

src/procedural-macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ A helper attribute for a derive macro is declared by adding its identifier to th
241241
> ```
242242
243243
r[macro.proc.attribute]
244-
## Attribute macros
244+
## The `proc_macro_attribute` attribute
245245
246246
r[macro.proc.attribute.intro]
247247
*Attribute macros* define new [outer attributes][attributes] which can be attached to [items], including items in [`extern` blocks], inherent and trait [implementations], and [trait definitions].
@@ -381,7 +381,7 @@ Note that neither declarative nor procedural macros support doc comment tokens
381381
(e.g. `/// Doc`), so they are always converted to token streams representing
382382
their equivalent `#[doc = r"str"]` attributes when passed to macros.
383383

384-
[Attribute macros]: #attribute-macros
384+
[Attribute macros]: #the-proc_macro_attribute-attribute
385385
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
386386
[Derive macros]: macro.proc.derive
387387
[Function-like macros]: #the-proc_macro-attribute

0 commit comments

Comments
 (0)