-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Indicate how to move value out of Box in docs. #54544
Conversation
r? @aidanhs (rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
f07171d
to
537c43a
Compare
r? @rust-lang/docs |
src/liballoc/boxed.rs
Outdated
@@ -16,10 +16,18 @@ | |||
//! | |||
//! # Examples | |||
//! | |||
//! Creating a box: | |||
//! Move a value from the stack to the heap by creating a `Box`: |
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.
Please add a link to Box
.
src/liballoc/boxed.rs
Outdated
//! let boxed: Box<u8> = Box::new(val); | ||
//! ``` | ||
//! | ||
//! Move a value from a `Box` back to the stack by [dereferencing]: |
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.
Same.
r=me once links added. |
537c43a
to
8d10f96
Compare
@bors r=GuillaumeGomez rollup |
📌 Commit 8d10f96 has been approved by |
…eGomez Indicate how to move value out of Box in docs. Fixes rust-lang#53634.
Rollup of 13 pull requests Successful merges: - #53784 (Document that slices cannot be larger than `isize::MAX` bytes) - #54308 (Better user experience when attempting to call associated functions with dot notation) - #54488 (in which we include attributes in unused `extern crate` suggestion spans) - #54544 (Indicate how to move value out of Box in docs.) - #54623 (Added help message for `impl_trait_in_bindings` feature gate) - #54641 (A few cleanups and minor improvements to rustc/infer) - #54656 (Correct doc for WorkQueue<T>::pop().) - #54674 (update miri) - #54676 (Remove `-Z disable_ast_check_for_mutation_in_guard`) - #54679 (Improve bug! message for impossible case in Relate) - #54681 (Rename sanitizer runtime libraries on OSX) - #54708 (Make ./x.py help <cmd> invoke ./x.py <cmd> -h on its own) - #54713 (Add nightly check for tool_lints warning)
Fixes #53634.