Skip to content

Commit 63cc743

Browse files
ehusstraviscross
authored andcommitted
Rename "Derive macros" section header
This renames it 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 57cff8c commit 63cc743

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

src/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ The following is an index of all built-in attributes.
373373
[`panic_handler`]: panic.md#the-panic_handler-attribute
374374
[`path`]: items/modules.md#the-path-attribute
375375
[`proc_macro_attribute`]: procedural-macros.md#attribute-macros
376-
[`proc_macro_derive`]: procedural-macros.md#derive-macros
376+
[`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
379379
[`repr`]: type-layout.md#representations

src/attributes/derive.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The `automatically_derived` attribute has no behavior.
103103
104104
[items]: ../items.md
105105
[derive macro]: macro.proc.derive
106-
[derive macros]: ../procedural-macros.md#derive-macros
106+
[derive macros]: macro.proc.derive
107107
[implementation]: ../items/implementations.md
108108
[items]: ../items.md
109-
[procedural macros]: ../procedural-macros.md#derive-macros
109+
[procedural macros]: macro.proc.derive

src/items/use-declarations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ fn main() {
448448
[associated items]: associated-items.md
449449
[Attributes]: ../attributes.md
450450
[Built-in types]: ../types.md
451-
[Derive macros]: ../procedural-macros.md#derive-macros
451+
[Derive macros]: macro.proc.derive
452452
[Enum variants]: enumerations.md
453453
[extern prelude]: ../names/preludes.md#extern-prelude
454454
[generic parameters]: generics.md

src/names/namespaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ It is still an error for a [`use` import] to shadow another macro, regardless of
144144
[closure]: ../expressions/closure-expr.md
145145
[Constant item declarations]: ../items/constant-items.md
146146
[Derive macro helpers]: ../procedural-macros.md#derive-macro-helper-attributes
147-
[Derive macros]: ../procedural-macros.md#derive-macros
147+
[Derive macros]: macro.proc.derive
148148
[entity]: ../glossary.md#entity
149149
[Enum variant constructors]: ../items/enumerations.md
150150
[enum]: ../items/enumerations.md

src/procedural-macros.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ expressions], [item] positions, including items in [`extern` blocks], inherent
131131
and trait [implementations], and [trait definitions].
132132

133133
r[macro.proc.derive]
134-
## Derive macros
134+
## The `proc_macro_derive` attribute
135135

136136
r[macro.proc.derive.intro]
137137
*Derive macros* define new inputs for the [`derive` attribute]. These macros can create new [items] given the token stream of a [struct], [enum], or [union]. They can also define [derive macro helper attributes].
@@ -362,7 +362,7 @@ their equivalent `#[doc = r"str"]` attributes when passed to macros.
362362

363363
[Attribute macros]: #attribute-macros
364364
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
365-
[Derive macros]: #derive-macros
365+
[Derive macros]: macro.proc.derive
366366
[Function-like macros]: #function-like-procedural-macros
367367
[`$crate`]: macro.decl.hygiene.crate
368368
[`Delimiter::None`]: proc_macro::Delimiter::None
@@ -396,3 +396,17 @@ their equivalent `#[doc = r"str"]` attributes when passed to macros.
396396
[type expressions]: types.md#type-expressions
397397
[type]: types.md
398398
[union]: items/unions.md
399+
400+
<script>
401+
(function() {
402+
var fragments = {
403+
"#derive-macros": "procedural-macros.html#the-proc_macro_derive-attribute",
404+
};
405+
var target = fragments[window.location.hash];
406+
if (target) {
407+
var url = window.location.toString();
408+
var base = url.substring(0, url.lastIndexOf('/'));
409+
window.location.replace(base + "/" + target);
410+
}
411+
})();
412+
</script>

0 commit comments

Comments
 (0)