Skip to content

Commit 2a2e80c

Browse files
committed
add backticks around use for use declarations
1 parent fb51ac5 commit 2a2e80c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/names/name-resolution.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ r[names.resolution]
44
r[names.resolution.intro]
55
_Name resolution_ is the process of tying paths and other identifiers to the declarations of those entities. Names are segregated into different [namespaces], allowing entities in different namespaces to share the same name without conflict. Each name is valid within a [scope], or a region of source text where that name may be referenced. Access to certain names may be restricted based on their [visibility].
66

7-
Name resolution is split into three stages throughout the compilation process. The first stage, *expansion-time resolution*, resolves all [use declarations] and [macro invocations]. The second stage, *primary resolution*, resolves all names that have not yet been resolved that do not depend on type information to resolve. The last stage, *type-relative resolution*, resolves the remaining names once type information is available.
7+
Name resolution is split into three stages throughout the compilation process. The first stage, *expansion-time resolution*, resolves all [`use` declarations] and [macro invocations]. The second stage, *primary resolution*, resolves all names that have not yet been resolved that do not depend on type information to resolve. The last stage, *type-relative resolution*, resolves the remaining names once type information is available.
88

99
> [!NOTE]
1010
>
@@ -15,7 +15,7 @@ r[names.resolution.expansion]
1515
## Expansion-time name resolution
1616

1717
r[names.resolution.expansion.intro]
18-
Expansion-time name resolution is the stage of name resolution necessary to complete macro expansion and fully generate a crate's AST. This stage requires the resolution of macro invocations and use declarations. Resolving use declarations is required to resolve [path-based scope] macro invocations. Resolving macro invocations is required in order to expand them.
18+
Expansion-time name resolution is the stage of name resolution necessary to complete macro expansion and fully generate a crate's AST. This stage requires the resolution of macro invocations and `use` declarations. Resolving `use` declarations is required to resolve [path-based scope] macro invocations. Resolving macro invocations is required in order to expand them.
1919

2020
r[names.resolution.expansion.unresolved-invocations]
2121
After expansion-time name resolution, the AST must not contain any unexpanded macro invocations. Every macro invocation resolves to a valid definition that exists in the final AST or an external crate.
@@ -58,7 +58,7 @@ All name resolution candidates selected during macro expansion are considering s
5858
r[names.resolution.expansion.imports]
5959
### Imports
6060
r[names.resolution.expansion.imports.intro]
61-
All use declarations are fully resolved during this stage of resolution. Type-relative paths cannot be resolved at this stage of compilation and will produce an error.
61+
All `use` declarations are fully resolved during this stage of resolution. Type-relative paths cannot be resolved at this stage of compilation and will produce an error.
6262
6363
```rust,compile_fail,E0432
6464
mod my_mod {
@@ -91,7 +91,7 @@ fn foo() {
9191
```
9292
9393
r[names.resolution.expansion.imports.shadowing]
94-
The following is a list of situations where shadowing of use declarations is permitted:
94+
The following is a list of situations where shadowing of `use` declarations is permitted:
9595

9696
* [`use` glob shadowing]
9797
* [Macro textual scope shadowing]
@@ -100,7 +100,7 @@ r[names.resolution.expansion.imports.ambiguity]
100100
#### Ambiguities
101101

102102
r[names.resolution.expansion.imports.ambiguity.intro]
103-
Some situations are an error when there is an ambiguity as to which macro definition, use declaration, or module an import or macro invocation's name refers to. This happens when there are two name candidates that do not resolve to the same entity where neither candidate is [permitted] to shadow the other.
103+
Some situations are an error when there is an ambiguity as to which macro definition, `use` declaration, or module an import or macro invocation's name refers to. This happens when there are two name candidates that do not resolve to the same entity where neither candidate is [permitted] to shadow the other.
104104

105105
r[names.resolution.expansion.imports.ambiguity.globvsglob]
106106
Names may not be resolved through ambiguous glob imports. Glob imports are allowed to import conflicting names in the same namespace as long as the name is not used. Names with conflicting candidates from ambiguous glob imports may still be shadowed by non glob imports and used without producing an error. The errors occur at time of use, not time of import.
@@ -237,7 +237,7 @@ fn foo() {
237237
```
238238
239239
r[names.resolution.expansion.imports.ambiguity.pathvstextualmacro]
240-
Path-based scope bindings for macros may not shadow textual scope bindings to macros. For bindings from [use declarations], this applies regardless of their [sub-namespace].
240+
Path-based scope bindings for macros may not shadow textual scope bindings to macros. For bindings from [`use` declarations], this applies regardless of their [sub-namespace].
241241

242242
```rust,compile_fail,E0659
243243
#[macro_export]
@@ -351,5 +351,5 @@ r[names.resolution.type-dependent]
351351
[permitted]: name-resolution.md#r-names.resolution.expansion.imports.shadowing
352352
[scope]: ../names/scopes.md
353353
[sub-namespace]: ../names/namespaces.md#r-names.namespaces.sub-namespaces
354-
[use declarations]: ../items/use-declarations.md
354+
[`use` declarations]: ../items/use-declarations.md
355355
[visibility]: ../visibility-and-privacy.md

0 commit comments

Comments
 (0)