Skip to content

Commit be918f0

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 6f98c08 commit be918f0

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`]: macro.proc.derive
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
@@ -229,7 +229,7 @@ A helper attribute for a derive macro is declared by adding its identifier to th
229229
> ```
230230
231231
r[macro.proc.attribute]
232-
## Attribute macros
232+
## The `proc_macro_attribute` attribute
233233
234234
r[macro.proc.attribute.intro]
235235
*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].
@@ -369,7 +369,7 @@ Note that neither declarative nor procedural macros support doc comment tokens
369369
(e.g. `/// Doc`), so they are always converted to token streams representing
370370
their equivalent `#[doc = r"str"]` attributes when passed to macros.
371371

372-
[Attribute macros]: #attribute-macros
372+
[Attribute macros]: #the-proc_macro_attribute-attribute
373373
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
374374
[Derive macros]: macro.proc.derive
375375
[Function-like macros]: #function-like-procedural-macros
@@ -405,3 +405,17 @@ their equivalent `#[doc = r"str"]` attributes when passed to macros.
405405
[type expressions]: types.md#type-expressions
406406
[type]: types.md
407407
[union]: items/unions.md
408+
409+
<script>
410+
(function() {
411+
var fragments = {
412+
"#attribute-macros": "procedural-macros.html#the-proc_macro_attribute-attribute",
413+
};
414+
var target = fragments[window.location.hash];
415+
if (target) {
416+
var url = window.location.toString();
417+
var base = url.substring(0, url.lastIndexOf('/'));
418+
window.location.replace(base + "/" + target);
419+
}
420+
})();
421+
</script>

0 commit comments

Comments
 (0)