Skip to content

Commit c94b515

Browse files
committed
Make final editorial revisions on name resolution
Many earlier passes of revisions have been squashed into the chapter itself. These edits are the final pass.
1 parent 9fe854c commit c94b515

File tree

5 files changed

+76
-72
lines changed

5 files changed

+76
-72
lines changed

src/items/use-declarations.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ mod clashing {
304304
```
305305

306306
> [!NOTE]
307-
>
308307
> For areas where shadowing is not allowed, see [name resolution ambiguities].
309308
310309
r[items.use.glob.last-segment-only]

src/macros-by-example.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ macro_rules! m {
349349
};
350350
}
351351

352-
// Introduce m2 macro as path-based candidate.
352+
// Introduce `m2` macro as path-based candidate.
353353
//
354354
// This item is in scope for this entire example, not just below the
355355
// use declaration.
@@ -361,7 +361,6 @@ m!(); // prints "m\n"
361361
```
362362

363363
> [!NOTE]
364-
>
365364
> For areas where shadowing is not allowed, see [name resolution ambiguities].
366365
367366
r[macro.decl.scope.path-based]
@@ -370,22 +369,22 @@ r[macro.decl.scope.path-based]
370369
r[macro.decl.scope.path-based.intro]
371370
By default, a macro has no path-based scope. Macros can gain path-based scope in two ways:
372371

373-
* [Use declaration re-export]
374-
* [`macro_export`]
372+
- [Use declaration re-export]
373+
- [`macro_export`]
375374

376375
r[macro.decl.scope.path.reexport]
377376
Macros can be re-exported to give them path-based scope from a module other than the crate root.
378377

379378
```rust
380-
mac::m!(); // OK: Path-based lookup finds m in the mac module.
379+
mac::m!(); // OK: Path-based lookup finds `m` in the mac module.
381380

382381
mod mac {
383-
// Introduce macro m with textual scope.
382+
// Introduce macro `m` with textual scope.
384383
macro_rules! m {
385384
() => {};
386385
}
387386

388-
// Re-export with path-based scope from within m's textual scope.
387+
// Reexport with path-based scope from within `m`'s textual scope.
389388
pub(crate) use m;
390389
}
391390
```
@@ -815,10 +814,8 @@ expansions, taking separators into account. This means:
815814

816815
For more detail, see the [formal specification].
817816

818-
[Hygiene]: #hygiene
819817
[Metavariables]: #metavariables
820818
[Repetitions]: #repetitions
821-
[Use declaration re-export]: items/use-declarations.md#use-visibility
822819
[`macro_export`]: #the-macro_export-attribute
823820
[`$crate`]: macro.decl.hygiene.crate
824821
[`extern crate self`]: items.extern-crate.self
@@ -829,3 +826,4 @@ For more detail, see the [formal specification].
829826
[loop labels]: expressions/loop-expr.md#loop-labels
830827
[name resolution ambiguities]: names/name-resolution.md#r-names.resolution.expansion.imports.ambiguity
831828
[token]: tokens.md
829+
[use declaration re-export]: items/use-declarations.md#use-visibility

src/macros.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ r[macro.invocation.name-resolution]
110110

111111
Macros invocations can be resolved via two kinds of scopes:
112112

113-
* Textual Scope
114-
* [Textual scope `macro_rules`](macros-by-example.md#r-macro.decl.scope.textual)
115-
* Path-based scope
116-
* [Path-based scope `macro_rules`](macros-by-example.md#r-macro.decl.scope.path-based)
117-
* [Procedural macros]
113+
- Textual Scope
114+
- [Textual scope `macro_rules`](macros-by-example.md#r-macro.decl.scope.textual)
115+
- Path-based scope
116+
- [Path-based scope `macro_rules`](macros-by-example.md#r-macro.decl.scope.path-based)
117+
- [Procedural macros]
118118

119119
[External blocks]: items/external-blocks.md
120120
[Macros by Example]: macros-by-example.md

0 commit comments

Comments
 (0)