Skip to content

Commit 8c1250f

Browse files
committed
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 649862e commit 8c1250f

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

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`]: procedural-macros.md#derive-macros
377377
[`proc_macro`]: procedural-macros.md#function-like-procedural-macros
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/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: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ struct Struct {
221221
```
222222

223223
r[macro.proc.attribute]
224-
## Attribute macros
224+
## The `proc_macro_attribute` attribute
225225

226226
r[macro.proc.attribute.intro]
227227
*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].
@@ -361,7 +361,7 @@ Note that neither declarative nor procedural macros support doc comment tokens
361361
(e.g. `/// Doc`), so they are always converted to token streams representing
362362
their equivalent `#[doc = r"str"]` attributes when passed to macros.
363363

364-
[Attribute macros]: #attribute-macros
364+
[Attribute macros]: #the-proc_macro_attribute-attribute
365365
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
366366
[Derive macros]: #derive-macros
367367
[Function-like macros]: #function-like-procedural-macros
@@ -397,3 +397,17 @@ their equivalent `#[doc = r"str"]` attributes when passed to macros.
397397
[type expressions]: types.md#type-expressions
398398
[type]: types.md
399399
[union]: items/unions.md
400+
401+
<script>
402+
(function() {
403+
var fragments = {
404+
"#attribute-macros": "procedural-macros.html#the-proc_macro_attribute-attribute",
405+
};
406+
var target = fragments[window.location.hash];
407+
if (target) {
408+
var url = window.location.toString();
409+
var base = url.substring(0, url.lastIndexOf('/'));
410+
window.location.replace(base + "/" + target);
411+
}
412+
})();
413+
</script>

0 commit comments

Comments
 (0)