Skip to content

doc: prelude nits #27398

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

Merged
merged 1 commit into from
Aug 4, 2015
Merged
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
6 changes: 3 additions & 3 deletions src/libstd/prelude/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//! The Rust Prelude
//!
//! Because `std` is required by most serious Rust software, it is
//! imported at the topmost level of every crate by default, as if the
//! first line of each crate was
//! imported at the topmost level of every crate by default, as if
//! each crate contains the following:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So to me, 'contains' sounds like it's the entire contents, not starting with. I would maybe say

Because std is required by most serious Rust software, it is imported at the topmost level of each crate by default. If this were explicit, it might look like this:

```ignore
extern crate std;

// your code here
```

like that. Whatcha think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not even inserted at the top of the crate (check -Z unstable-options --pretty=expanded). I think it does not need to be mentioned where exactly it's inserted, as this is something of an implementation detail, and not such an important detail at that. It's good enough that it's inserted, somewhere.

//!
//! ```ignore
//! extern crate std;
Expand All @@ -23,7 +23,7 @@
//! etc.
//!
//! Additionally, `std` contains a versioned *prelude* that reexports many of the
//! most common traits, types and functions. *The contents of the prelude are
//! most common traits, types, and functions. *The contents of the prelude are
//! imported into every module by default*. Implicitly, all modules behave as if
//! they contained the following [`use` statement][book-use]:
//!
Expand Down