Skip to content

Commit b703cc2

Browse files
yaahcehuss
andauthored
Apply suggestions from code review
Co-authored-by: Eric Huss <[email protected]>
1 parent fb4fee6 commit b703cc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/names/name-resolution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ r[names.resolution.expansion.expansion-order-stability]
4343
The resolution of names must be *stable*. After expansion, names in the fully expanded AST must resolve to the same definition, regardless of the order in which macros are expanded.
4444

4545
r[names.resolution.expansion.speculation]
46-
All name resolution candidates selected during macro expansion are considering speculative. Once the crate has been fully expanded all speculative import resolutions are validated to ensure that no new ambiguities were introduced by macro expansion.
46+
All name resolution candidates selected during macro expansion are considered speculative. Once the crate has been fully expanded, all speculative import resolutions are validated to ensure that macro expansion did not introduce any new ambiguities.
4747

4848
> [!NOTE]
4949
>
@@ -130,7 +130,7 @@ r[names.resolution.expansion.imports.ambiguity]
130130
r[names.resolution.expansion.imports.ambiguity.intro]
131131
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.
132132

133-
r[names.resolution.expansion.imports.ambiguity.globvsglob]
133+
r[names.resolution.expansion.imports.ambiguity.glob-vs-glob]
134134
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.
135135

136136
For example:
@@ -223,7 +223,7 @@ pub fn qux() {
223223
```
224224

225225
> [!NOTE]
226-
> These ambiguity errors are specific to imports, even though they are only observed when those imports are used, having multiple candidates available for a given name during later stages of resolution is not considered an error, so long as none of the imports themselves are ambiguous, there will always be a single unambiguous closest resolution during later stages.
226+
> These ambiguity errors are specific to imports, even though they are only observed when those imports are used. Having multiple candidates available for a given name during later stages of resolution is not considered an error, so long as none of the imports themselves are ambiguous, there will always be a single unambiguous closest resolution.
227227
>
228228
> ```rust
229229
> mod bar {

0 commit comments

Comments
 (0)