We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b089e79 commit 15334e0Copy full SHA for 15334e0
src/liballoc/boxed.rs
@@ -472,8 +472,8 @@ impl<T> From<Box<T>> for Pin<Box<T>> {
472
impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
473
/// Converts a `&[T]` into a `Box<[T]>`
474
///
475
- /// This conversion does not allocate on the heap
476
- /// but performs a copy of `slice`.
+ /// This conversion allocates on the heap
+ /// and performs a copy of `slice`.
477
478
/// # Examples
479
/// ```rust
@@ -494,7 +494,8 @@ impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
494
impl<'a> From<&'a str> for Box<str> {
495
/// Converts a `&str` into a `Box<str>`
496
497
- /// This conversion does not allocate on the heap and happens in place.
498
+ /// and performs a copy of `s`.
499
500
501
0 commit comments