Skip to content
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

Clean up Box documentation. #24629

Merged
merged 1 commit into from
Apr 21, 2015
Merged

Clean up Box documentation. #24629

merged 1 commit into from
Apr 21, 2015

Conversation

steveklabnik
Copy link
Member

Without the box keyword, one of these two reasons is not correct, so
let's just eliminate this section and elaborate on the reason for the
legit use case inline.

Fixes #24511

Without the `box` keyword, one of these two reasons is not correct, so
let's just eliminate this section and elaborate on the reason for the
legit use case inline.

Fixes rust-lang#24511
@rust-highfive
Copy link
Collaborator

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

//! ```
//!
//! It wouldn't work. This is because the size of a `List` depends on how many elements are in the
//! list, and so we don't know how much memory to allocate for a `Cons`. By introducing a `Box`,
Copy link
Contributor

Choose a reason for hiding this comment

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

This paragraph lacks curly apostrophes, if you still plan to use those throughout the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes! Interesting, about my editor set up.

I think for now leaving these straight is fine. I've only been doing it in the book thus far, where imho it matters more.

@alexcrichton
Copy link
Member

@bors: r+ ac09864 rollup

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 20, 2015
Without the `box` keyword, one of these two reasons is not correct, so
let's just eliminate this section and elaborate on the reason for the
legit use case inline.

Fixes rust-lang#24511
bors added a commit that referenced this pull request Apr 20, 2015
steveklabnik added a commit to steveklabnik/rust that referenced this pull request Apr 21, 2015
Without the `box` keyword, one of these two reasons is not correct, so
let's just eliminate this section and elaborate on the reason for the
legit use case inline.

Fixes rust-lang#24511
bors added a commit that referenced this pull request Apr 21, 2015
@bors bors merged commit ac09864 into rust-lang:master Apr 21, 2015
@steveklabnik steveklabnik mentioned this pull request Apr 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alloc::boxed points to old pointers chapter
6 participants