Skip to content

Commit 30bb0f0

Browse files
committed
Add a bit about a prelude::v1 module
1 parent 2ac10c8 commit 30bb0f0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

text/0000-prelude-stabilization.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,24 @@ pub use comm::{SyncSender, Sender, Receiver};
264264
pub use task::spawn;
265265
```
266266

267+
## Move to an inner `v1` module
268+
269+
This RFC also proposes moving all reexports to `std::prelude::v1` module instead
270+
of just inside `std::prelude`. The compiler will then start injecting `use
271+
std::prelude::v1::*`.
272+
273+
This is a pre-emptive move to help provide room to grow the prelude module over
274+
time. It is unlikely that any reexports could ever be added to the prelude
275+
backwards-compatibly, so newer preludes (which may happen over time) will have
276+
to live in new modules. If the standard library grows multiple preludes over
277+
time, then it is expected for crates to be able to specify which prelude they
278+
would like to be compiled with. This feature is left as an open question,
279+
however, and movement to an inner `v1` module is simply preparation for this
280+
possible move happening in the future.
281+
282+
The versioning scheme for the prelude over time (if it happens) is also left as
283+
an open question by this RFC.
284+
267285
# Drawbacks
268286

269287
A fairly large amount of functionality was removed from the prelude in order to

0 commit comments

Comments
 (0)