Skip to content

Commit 56bd67c

Browse files
committed
Address feedback
1 parent 70346ed commit 56bd67c

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

posts/2023-12-10-2024-Edition-CFP.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ and Rust is no exception.
5252
So if you've got ideas for how Rust could be better if only that pesky stability guarantee
5353
weren't around, now's the time to share!
5454
Also note that potential Edition-related changes aren't just limited to the language itself:
55-
we'll also consider proposed changes to the standard library, Cargo, and rustfmt.
55+
we'll also consider changes to both Cargo and rustfmt as well.
5656

5757
Please keep in mind that the following criteria determine the sort of changes we're looking for:
5858

@@ -79,22 +79,38 @@ unblocking future feature development, and making the language easier and more c
7979

8080
[jeff]: https://www.youtube.com/watch?v=9nazm3_OXac
8181

82-
As an example, in the 2015 Edition a dynamically-dispatched trait object
83-
has a type that looks like `Box<Foo>`.
84-
In the 2018 Edition, in order to distinguish this from the then-new,
85-
statically-dispatched `impl Trait` syntax, trait objects began to require the `dyn` keyword,
86-
so `Box<Foo>` became `Box<dyn Foo>`.
87-
To make this migration automatic, `cargo fix` gained the ability to rewrite the types
88-
of trait objects,
89-
as well as to rewrite identifiers in case any code out there was using `dyn` as a variable name.
82+
To spark your imagination, here's a real-world example.
83+
In the 2015 and 2018 Editions, iterating over a fixed-length array via `[foo].into_iter()`
84+
will yield *references* to the iterated elements;
85+
this is is surprising because, on other types, calling `.into_iter()` produces an iterator
86+
[that yields owned values rather than references][iters].
87+
This limitation existed because older versions of Rust lacked the ability to implement
88+
traits for all possible fixed-length arrays in a generic way.
89+
Once Rust finally [became able to express this][notes],
90+
*all* Editions at last gained the ability to iterate over owned values in fixed-length arrays;
91+
however, in the specific case of `[foo].into_iter()`,
92+
altering the existing behavior would have broken lots of code in the wild.
93+
Therefore, we used the 2021 Edition to fix this inconsistency
94+
for the specific case of `[foo].into_iter()`,
95+
allowing us to address [this long-standing issue][25725] while
96+
preserving Rust's stability guarantees.
97+
98+
[iters]: https://doc.rust-lang.org/std/iter/#the-three-forms-of-iteration
99+
100+
[notes]: https://blog.rust-lang.org/2021/06/17/Rust-1.53.0.html#intoiterator-for-arrays
101+
102+
[25725]: https://github.com/rust-lang/rust/issues/25725
90103

91104
## How to contribute
92105

93106
Just like other changes to Rust, Edition-related proposals follow the RFC process,
94107
as documented in [the Rust RFCs repository][rfcs].
108+
Please follow the process documented there, and please consider [publicizing a draft of your RFC][rfcs2] to collect preliminary feedback before officially submitting it, in order to expedite the RFC process once you've filed it for real! (And in addition to the venues mentioned in the prior link, please feel free to announce your pre-RFC to [our Zulip channel][zulip].)
95109

96110
[rfcs]: https://github.com/rust-lang/rfcs/#rust-rfcs---rfc-book---active-rfc-list
97111

112+
[rfcs2]: https://github.com/rust-lang/rfcs/#before-creating-an-rfc
113+
98114
Please file your RFCs as soon as possible!
99115
Our goal is to release the 2024 Edition in the second half of 2024,
100116
which means we would like to get everything *implemented*

0 commit comments

Comments
 (0)