]> git.lizzy.rs Git - rust.git/commit
Add the `alloc::prelude` module
authorSimon Sapin <simon.sapin@exyr.org>
Fri, 6 Jul 2018 22:43:11 +0000 (00:43 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Sat, 7 Jul 2018 21:08:43 +0000 (23:08 +0200)
commitb842177cfac47668376c98932a931eaf47eed542
tree52927db780f043931d98cdc8e550136a97feb75f
parente06c875442e91cc2c597135d1e807a69e73eee26
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
https://github.com/rust-lang/rfcs/pull/2480
src/liballoc/lib.rs
src/liballoc/prelude.rs [new file with mode: 0644]