Skip to content

Commit dbd5c75

Browse files
committed
Minor clarification for private fields
1 parent 9532a9a commit dbd5c75

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

text/0000-api-evolution.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,14 @@ fn bar() { ... }
169169
The problem here is that glob imports currently do not allow any of their
170170
imports to be shadowed by an explicitly-defined item.
171171

172-
There are two reasons this is considered a minor change by this RFC:
172+
This is considered a minor change because under the principles of this RFC: the
173+
glob imports could have been written as more explicit (expanded) `use`
174+
statements. It is also plausible to do this expansion automatically for a
175+
crate's dependencies, to prevent breakage in the first place.
173176

174-
1. The RFC also suggests permitting shadowing of a glob import by any explicit
175-
item. This has been the intended semantics of globs, but has not been
176-
implemented. The details are left to a future RFC, however.
177-
178-
2. Even if that change were made, though, there is still the case where two glob
179-
imports conflict with each other, without any explicit definition "covering"
180-
them. This is permitted to produce an error under the principles of this RFC
181-
because the glob imports could have been written as more explicit (expanded)
182-
`use` statements. It is also plausible to do this expansion automatically for
183-
a crate's dependencies, to prevent breakage in the first place.
177+
(This RFC also suggests permitting shadowing of a glob import by any explicit
178+
item. This has been the intended semantics of globs, but has not been
179+
implemented. The details are left to a future RFC, however.)
184180

185181
### Structs
186182

@@ -197,7 +193,7 @@ write, which can break code irreparably.
197193
This change retains the ability to use struct literals, but it breaks existing
198194
uses of such literals; it likewise breaks exhaustive matches against the struct.
199195

200-
#### Minor change: adding or removing private fields when at least one already exists.
196+
#### Minor change: adding or removing private fields when at least one already exists (before and after the change).
201197

202198
No existing code could be relying on struct literals for the struct, nor on
203199
exhaustively matching its contents, and client code will likewise be oblivious

0 commit comments

Comments
 (0)