Skip to content

Commit 08d31ec

Browse files
ehusstraviscross
authored andcommitted
Rename "Path-Based Scope" section title
This renames the section title to "The `macro_export` attribute" 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 99c96cd commit 08d31ec

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
@@ -33,6 +33,7 @@ use-boolean-and = true
3333
"/items/modules.html#prelude-items" = "../names/preludes.html"
3434
"/items/traits.html#object-safety" = "traits.html#dyn-compatibility"
3535
"/lifetime-elision.html#static-lifetime-elision" = "lifetime-elision.html#const-and-static-elision"
36+
"/macros-by-example.html#path-based-scope" = "macros-by-example.html#the-macro_export-attribute"
3637
"/procedural-macros.html#derive-macros" = "procedural-macros.html#the-proc_macro_derive-attribute"
3738
"/runtime.html#the-panic_handler-attribute" = "panic.html#the-panic_handler-attribute"
3839
"/unsafe-blocks.html" = "unsafe-keyword.html"

src/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ The following is an index of all built-in attributes.
359359
[`link_ordinal`]: items/external-blocks.md#the-link_ordinal-attribute
360360
[`link_section`]: abi.md#the-link_section-attribute
361361
[`link`]: items/external-blocks.md#the-link-attribute
362-
[`macro_export`]: macros-by-example.md#path-based-scope
362+
[`macro_export`]: macros-by-example.md#the-macro_export-attribute
363363
[`macro_use`]: macros-by-example.md#the-macro_use-attribute
364364
[`must_use`]: attributes/diagnostics.md#the-must_use-attribute
365365
[`naked`]: attributes/codegen.md#the-naked-attribute

src/macros-by-example.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ r[macro.decl.scope.macro_use.export]
368368
Macros to be imported with `#[macro_use]` must be exported with
369369
`#[macro_export]`, which is described below.
370370

371-
r[macro.decl.scope.path]
372-
### Path-based scope
371+
r[macro.decl.scope.macro_export]
372+
### The `macro_export` attribute
373373

374-
r[macro.decl.scope.path.intro]
375374
By default, a macro has no path-based scope. However, if it has the `#[macro_export]` attribute, then it is declared in the crate root scope and can be referred to normally as such:
375+
r[macro.decl.scope.macro_export.intro]
376376

377377
```rust
378378
self::m!();

src/names.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ to with certain [path qualifiers] or aliases.
137137
[`for`]: expressions/loop-expr.md#iterator-loops
138138
[`if let`]: expressions/if-expr.md#if-let-patterns
139139
[`let` statement]: statements.md#let-statements
140-
[`macro_export` attribute]: macros-by-example.md#path-based-scope
140+
[`macro_export` attribute]: macros-by-example.md#the-macro_export-attribute
141141
[`macro_rules` declarations]: macros-by-example.md
142142
[`macro_use` attribute]: macros-by-example.md#the-macro_use-attribute
143143
[`match`]: expressions/match-expr.md

src/names/scopes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl ImplExample {
343343
[`if let`]: ../expressions/if-expr.md#if-let-patterns
344344
[`while let`]: ../expressions/loop-expr.md#while-let-patterns
345345
[`let` statement]: ../statements.md#let-statements
346-
[`macro_export`]: ../macros-by-example.md#path-based-scope
346+
[`macro_export`]: ../macros-by-example.md#the-macro_export-attribute
347347
[`macro_use` prelude]: preludes.md#macro_use-prelude
348348
[`macro_use`]: ../macros-by-example.md#the-macro_use-attribute
349349
[`match` arms]: ../expressions/match-expr.md

0 commit comments

Comments
 (0)