Skip to content

Commit 23fa07e

Browse files
committed
Adjust text to fix poor wording, typos, and add a few details.
1 parent cc19a1b commit 23fa07e

File tree

1 file changed

+35
-17
lines changed

1 file changed

+35
-17
lines changed

text/0000-language-semver.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ This RFC has two main goals:
1717
With the release of 1.0, we need to establish clear policy on what
1818
precisely constitutes a "minor" vs "major" change to the Rust language
1919
itself (as opposed to libraries, which are covered by [RFC 1105]).
20-
**This RFC proposes that breaking changes are only permitted within a
21-
minor release if they are fix to restore soundness**: this includes
22-
both bug fixes in the compiler itself, as well as changes to the type
23-
system or RFCs that are necessary to close flaws uncovered later.
20+
**This RFC proposes that minor releases may only contain breaking
21+
changes that fix compiler bugs or other type-system
22+
issues**. Primarily, this means soundness issues where "innocent" code
23+
can cause undefined behavior (in the technical sense), but it also
24+
covers cases like compiler bugs and tightening up the semantics of
25+
"underspecified" parts of the language (more details below).
2426

2527
However, simply landing all breaking changes immediately could be very
2628
disruptive to the ecosystem. Therefore, **the RFC also proposes
@@ -53,7 +55,7 @@ considering in separate RFCs.
5355

5456
# Detailed design
5557

56-
The detailed design is broken into two major section: how to address
58+
The detailed design is broken into two major sections: how to address
5759
soundness changes, and how to address other, opt-in style changes. We
5860
do not discuss non-breaking changes here, since obviously those are
5961
safe.
@@ -145,8 +147,8 @@ cause code to compile which should not (because ambiguities
145147
exist). Finally, there is a list below of areas of the language which
146148
are generally considered underspecified.
147149

148-
We expect that there will be cases that fall on a grey line betwen bug
149-
and expected behavior, and discussion will be needed to determine
150+
We expect that there will be cases that fall on a grey line between
151+
bug and expected behavior, and discussion will be needed to determine
150152
where it falls. The recent conflict between `Rc` and scoped threads is
151153
an example of such a discusison: it was clear that both APIs could not
152154
be legal, but not clear which one was at fault. The results of these
@@ -214,9 +216,10 @@ Known areas where change is expected include the following:
214216
- Memory allocation in unsafe code is currently unstable. We expect to
215217
be defining safe interfaces as part of the work on supporting
216218
tracing garbage collectors (see [#415]).
217-
- The treatment of hygiene in macros is uneven (see [#22462], [#24278]). In some cases,
218-
changes here may be backwards compatible, or may be more appropriate only with explicit opt-in
219-
(or perhaps an alternate macro system altogether).
219+
- The treatment of hygiene in macros is uneven (see [#22462],
220+
[#24278]). In some cases, changes here may be backwards compatible,
221+
or may be more appropriate only with explicit opt-in (or perhaps an
222+
alternate macro system altogether, such as [this proposal][macro]).
220223
- Lints will evolve over time (both the lints that are enabled and the
221224
precise cases that lints catch). We expect to introduce a
222225
[means to limit the effect of these changes on dependencies][#1029].
@@ -242,7 +245,7 @@ Although it is not directly covered by this RFC, it's worth noting in
242245
passing that some of the CLI flags to the compiler may change in the
243246
future as well. The `-Z` flags are of course explicitly unstable, but
244247
some of the `-C`, rustdoc, and linker-specific flags are expected to
245-
evolve over time.
248+
evolve over time (see e.g. [#24451]).
246249

247250
### Opt-in changes
248251

@@ -271,8 +274,8 @@ The supplied version is used by the compiler to produce the semantics
271274
of Rust "as it was" during version `X.Y`. RFCs that propose opt-in
272275
changes should discuss how the older behavior can be supported in the
273276
compiler, but this is expected to be straightforward: if supporting
274-
older behavior is hard to do, it may indicate that the opt-in change
275-
is too complex and should not be accepted.
277+
older behavior is hard to do, this may be an indication that the
278+
opt-in change is too complex and should not be accepted.
276279

277280
Note that the supplied version may affect the parser configuration
278281
used when parsing the initial crate, since it can affect the keywords
@@ -290,9 +293,16 @@ the compiler's version (i.e., the newest version the compiler knows
290293
about).
291294

292295
Cargo will always invoke `rustc` with a supplied version. If there is
293-
no version in the `Cargo.toml` file, then `1.0.0` is assumed. Whenever
294-
a new project is created with `cargo new`, the new `Cargo.toml` will
295-
include the most recent Rust version number by default.
296+
no version in the `Cargo.toml` file, then `1.0.0` is assumed. (It may
297+
be a good idea to issue a warning in this case as well.)
298+
299+
Whenever a new project is created with `cargo new`, the new
300+
`Cargo.toml` will include the most recent Rust version number by
301+
default. (Since Cargo and rustc are not, at least today, necessarily
302+
released on the same schedule, we'll have to pick some sensible
303+
definition of the "most recent" Rust version number; one option is to
304+
query the `rustc` executable in scope. Another is to synchronize the
305+
release schedules and use the "built-in" notion.)
296306

297307
Note that the defaults for `rustc` and `cargo` differ. `rustc` prefers
298308
the most recent verison of Rust by default, whereas `cargo` prefers
@@ -342,6 +352,12 @@ accept an "opt-in" change:
342352
- What changes are needed to get code compiling again? Are those
343353
changes obvious from the error message?
344354

355+
Another important criterion is the implementation complexity. In
356+
particular, how easy will it be to maintain both the older behavior
357+
and the newer behavior? It is important to consider not just the
358+
complexity today, but possible complexity in the future as the
359+
compiler changes.
360+
345361
# Drawbacks
346362

347363
**Allowing unsafe code to continue compiling -- even with warnings --
@@ -481,7 +497,7 @@ introduce an attribute in advance we will not have this problem.
481497

482498
[RFC 1105]: https://github.com/rust-lang/rfcs/pull/1105
483499
[RFC 320]: https://github.com/rust-lang/rfcs/pull/320
484-
[#774]: https://github.com/rust-lang/rfcs/issues/744
500+
[#744]: https://github.com/rust-lang/rfcs/issues/744
485501
[#14875]: https://github.com/rust-lang/rust/issues/14875
486502
[#16135]: https://github.com/rust-lang/rust/issues/16135
487503
[#19733]: https://github.com/rust-lang/rust/issues/19733
@@ -492,3 +508,5 @@ introduce an attribute in advance we will not have this problem.
492508
[#24278]: https://github.com/rust-lang/rust/issues/24278
493509
[#1029]: https://github.com/rust-lang/rfcs/issues/1029
494510
[RFC 560]: https://github.com/rust-lang/rfcs/pull/560
511+
[macro]: https://internals.rust-lang.org/t/pre-rfc-macro-improvements/2088
512+
[#24451]: https://github.com/rust-lang/rust/pull/24451

0 commit comments

Comments
 (0)