Skip to content

Document Box::into_raw returns non-null ptr #53462

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 21, 2018

Conversation

estk
Copy link
Contributor

@estk estk commented Aug 18, 2018

Closes #52806.

r? @sfackler

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 18, 2018
@sfackler
Copy link
Member

r? @steveklabnik

Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

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

Just a small formatting nit, thank you so much!

@@ -126,7 +126,8 @@ impl<T: ?Sized> Box<T> {
Box(Unique::new_unchecked(raw))
}

/// Consumes the `Box`, returning the wrapped raw pointer.
/// Consumes the `Box`, returning the wrapped raw pointer, which
/// will be properly aligned and non-null.
Copy link
Member

Choose a reason for hiding this comment

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

So, rustdoc uses the first line as a summary, and this ends up being a bit long. Could you maybe change it to

/// Consumes the `Box<T>`, returning a raw pointer.
///
/// The pointer will be properly aligned and non-null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @steveklabnik, I didn't know that.

@estk estk force-pushed the doc-Box_into_raw branch from 513dd18 to de35b66 Compare August 20, 2018 16:56
Copy link
Member

@steveklabnik steveklabnik left a comment

Choose a reason for hiding this comment

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

Thank you!

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 20, 2018

📌 Commit de35b66 has been approved by steveklabnik

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 21, 2018
bors added a commit that referenced this pull request Aug 21, 2018
Rollup of 17 pull requests

Successful merges:

 - #53030 (Updated RELEASES.md for 1.29.0)
 - #53104 (expand the documentation on the `Unpin` trait)
 - #53213 (Stabilize IP associated constants)
 - #53296 (When closure with no arguments was expected, suggest wrapping)
 - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.)
 - #53363 (add individual docs to `core::num::NonZero*`)
 - #53370 (Stabilize macro_vis_matcher)
 - #53393 (Mark libserialize functions as inline)
 - #53405 (restore the page title after escaping out of a search)
 - #53452 (Change target triple used to check for lldb in build-manifest)
 - #53462 (Document Box::into_raw returns non-null ptr)
 - #53465 (Remove LinkMeta struct)
 - #53492 (update lld submodule to include RISCV patch)
 - #53496 (Fix typos found by codespell.)
 - #53521 (syntax: Optimize some literal parsing)
 - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/)
 - #53551 (Avoid some Place clones.)

Failed merges:

r? @ghost
@bors bors merged commit de35b66 into rust-lang:master Aug 21, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants