-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Add explanation of main to rustdoc docs #21041
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
The full logic is actually a bit more complicated than this, but I'm not sure how much in detail it should be spelled out. Specifically, the steps taken are:
This result is then tested. Specifically, the example here isn't quite right, as what's actually tested look more like: fn main() {
use std::rc:Rc;
let five = Rc::new(5);
} |
@alexcrichton I added the full thing, with some copyedit and formatting changes. I'm fine with just repeating it verbatim, I don't think this is incredibly likely to change. |
Add explanation of main to rustdoc docs Reviewed-by: alexcrichton
Add explanation of main to rustdoc docs Reviewed-by: alexcrichton
Add explanation of main to rustdoc docs Reviewed-by: alexcrichton
``` | ||
|
||
fn main() { | ||
use std::rc:Rc; |
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.
rc:Rc
should be rc::Rc
.
Add explanation of main to rustdoc docs Reviewed-by: steveklabnik
Fixes #17554