Skip to content

Add links to how to disable the default prelude #31900

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/libcore/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand Down
9 changes: 9 additions & 0 deletions src/libstd/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down