diff --git a/src/libcore/prelude/v1.rs b/src/libcore/prelude/v1.rs index 75db6fceab9b7..098d5eff05010 100644 --- a/src/libcore/prelude/v1.rs +++ b/src/libcore/prelude/v1.rs @@ -12,7 +12,10 @@ //! //! This module is intended for users of libcore which do not link to libstd as //! well. This module is imported by default when `#![no_std]` is used in the -//! same manner as the standard library's prelude. +//! same manner as the standard library's prelude (so not at all if the +//! [`no_implicit_prelude` attribute][module-only-attributes] is used). +//! +//! [module-only-attributes]: ../../../reference.html#module-only-attributes #![stable(feature = "core_prelude", since = "1.4.0")] diff --git a/src/libstd/prelude/mod.rs b/src/libstd/prelude/mod.rs index ebd299efa78db..f69f92611b589 100644 --- a/src/libstd/prelude/mod.rs +++ b/src/libstd/prelude/mod.rs @@ -47,6 +47,15 @@ //! are not automatically `use`'d, and must be imported manually. This is still //! easier than importing all of their constituent components. //! +//! # Disabling +//! +//! To disable automatic inclusion of the standard prelude you can use the +//! [`no_implicit_prelude` attribute][module-only-attributes]. This should be +//! rarely used, but can be useful if you have a need for very careful control +//! of what parts of `std` are included. +//! +//! [module-only-attributes]: ../../reference.html#module-only-attributes +//! //! # Prelude contents //! //! The current version of the prelude (version 1) lives in