-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the alloc::prelude
module
#52159
Conversation
It contains the re-exports that are in `std::prelude::v1` but not in `core::prelude::v1`. Calling it prelude is somewhat of a misnomer since (unlike those modules in `std` or `core`) its contents are never implicitly imported in modules. Rather it is intended to be used with an explicit glob import like `use alloc::prelude::*;`. However there is precedent for the same misnomer with `std::io::prelude`, for example. This new module is unstable with the same feature name as the `alloc` care. They are proposed for stabilization together in RFC rust-lang/rfcs#2480
r? @aidanhs (rust_highfive has picked a reviewer for you, use r? to override) |
As discussed in #52119, this not using a |
@bors: r+ |
📌 Commit 5b795cf has been approved by |
Add the `alloc::prelude` module It contains the re-exports that are in `std::prelude::v1` but not in `core::prelude::v1`. Calling it prelude is somewhat of a misnomer since (unlike those modules in `std` or `core`) its contents are never implicitly imported in modules. Rather it is intended to be used with an explicit glob import like `use alloc::prelude::*;`. However there is precedent for the same misnomer with `std::io::prelude`, for example. This new module is unstable with the same feature name as the `alloc` care. They are proposed for stabilization together in RFC rust-lang/rfcs#2480.
☀️ Test successful - status-appveyor, status-travis |
It contains the re-exports that are in
std::prelude::v1
but not incore::prelude::v1
.Calling it prelude is somewhat of a misnomer since (unlike those modules in
std
orcore
) its contents are never implicitly imported in modules. Rather it is intended to be used with an explicit glob import likeuse alloc::prelude::*;
. However there is precedent for the same misnomer withstd::io::prelude
, for example.This new module is unstable with the same feature name as the
alloc
care. They are proposed for stabilization together in RFC rust-lang/rfcs#2480.