-
Notifications
You must be signed in to change notification settings - Fork 13.3k
std: Update crate docs #25224
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
std: Update crate docs #25224
Conversation
Attempted to organize them in a way more relevant to what newbies would be interested in hearing.
//! | ||
//! ## Intrinsic types and operations | ||
//! It is linked to all Rust crates by default as though they |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rust standard library is available to all rust crates by default, just as if...
Small wording suggestion that I think makes this more newbie friendly :)
Also, as a newbie, I don't quite understand what "crate-level" means in this context? As far as my understanding goes, there's no way to automatically have extern crate some_crate
for all modules in a crate (besides the std library), but its very possible I am mistaken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means 'in your crate root', which is how we usually say it. i'd update it to that wording.
Hey, was originally just going to weigh in my perspective as a rust newbie on your changes, but ended up doing a proofread also. Sorry if my comments are pedantic! |
//! contained a crate-level `extern crate std` crate import. Therefore | ||
//! the standard library can be accessed in `use` statements through | ||
//! the path `std`, as in `use std::thread`, or in expressions through | ||
//! the absolute path `::std`, as in `::std::thread::sleep_ms(100)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct to refer to ::std as a path or a namespace or are both correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both are, i'd say
After a few nits, r=me. I've also thought this could be improved but was never really satisfied with how to do so. |
@bors: r+ rollup |
📌 Commit 6ebba71 has been approved by |
Attempted to organize them in a way more relevant to what newbies would be interested in hearing. I am not satisfied by this at all, but by virtue of deleting old links alone I think it is an improvement. r? @steveklabnik
Attempted to organize them in a way more relevant to what newbies would be interested in hearing. I am not satisfied by this at all, but by virtue of deleting old links alone I think it is an improvement. r? @steveklabnik
Attempted to organize them in a way more relevant to what newbies
would be interested in hearing.
I am not satisfied by this at all, but by virtue of deleting old links alone I think it is an improvement.
r? @steveklabnik