Skip to content

Commit 541422c

Browse files
committed
Rename "Function-like procedural 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 e22e1c8 commit 541422c

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

book.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use-boolean-and = true
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"
3737
"/procedural-macros.html#derive-macros" = "procedural-macros.html#the-proc_macro_derive-attribute"
38+
"/procedural-macros.html#function-like-procedural-macros" = "procedural-macros.html#the-proc_macro-attribute"
3839
"/runtime.html#the-panic_handler-attribute" = "panic.html#the-panic_handler-attribute"
3940
"/unsafe-blocks.html" = "unsafe-keyword.html"
4041
"/unsafe-functions.html" = "unsafe-keyword.html"

src/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ The following is an index of all built-in attributes.
374374
[`path`]: items/modules.md#the-path-attribute
375375
[`proc_macro_attribute`]: procedural-macros.md#attribute-macros
376376
[`proc_macro_derive`]: macro.proc.derive
377-
[`proc_macro`]: procedural-macros.md#function-like-procedural-macros
377+
[`proc_macro`]: procedural-macros.md#the-proc_macro-attribute
378378
[`recursion_limit`]: attributes/limits.md#the-recursion_limit-attribute
379379
[`repr`]: type-layout.md#representations
380380
[`should_panic`]: attributes/testing.md#the-should_panic-attribute

src/names/namespaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ It is still an error for a [`use` import] to shadow another macro, regardless of
153153
[field expression]: ../expressions/field-expr.md
154154
[Function declarations]: ../items/functions.md
155155
[function parameters]: ../items/functions.md#function-parameters
156-
[Function-like procedural macros]: ../procedural-macros.md#function-like-procedural-macros
156+
[Function-like procedural macros]: ../procedural-macros.md#the-proc_macro-attribute
157157
[Generic const parameters]: ../items/generics.md#const-generics
158158
[Generic lifetime parameters]: ../items/generics.md
159159
[Generic type parameters]: ../items/generics.md

src/procedural-macros.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ items in libraries (for example, `::std::option::Option` instead of `Option`) or
7979
by ensuring that generated functions have names that are unlikely to clash with
8080
other functions (like `__internal_foo` instead of `foo`).
8181
82-
r[macro.proc.function]
83-
## Function-like procedural macros
82+
<!-- TODO: rule name needs improvement -->
83+
r[macro.proc.proc_macro]
84+
## The `proc_macro` attribute
8485
8586
r[macro.proc.function.intro]
8687
*Function-like procedural macros* are procedural macros that are invoked using the macro invocation operator (`!`).
@@ -376,7 +377,7 @@ their equivalent `#[doc = r"str"]` attributes when passed to macros.
376377
[Attribute macros]: #attribute-macros
377378
[Cargo's build scripts]: ../cargo/reference/build-scripts.html
378379
[Derive macros]: macro.proc.derive
379-
[Function-like macros]: #function-like-procedural-macros
380+
[Function-like macros]: #the-proc_macro-attribute
380381
[`$crate`]: macro.decl.hygiene.crate
381382
[`Delimiter::None`]: proc_macro::Delimiter::None
382383
[`Group`]: proc_macro::Group

0 commit comments

Comments
 (0)