Skip to content

Commit 15334e0

Browse files
committed
Fix documentation for those that allocate on heap
1 parent b089e79 commit 15334e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/liballoc/boxed.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ impl<T> From<Box<T>> for Pin<Box<T>> {
472472
impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
473473
/// Converts a `&[T]` into a `Box<[T]>`
474474
///
475-
/// This conversion does not allocate on the heap
476-
/// but performs a copy of `slice`.
475+
/// This conversion allocates on the heap
476+
/// and performs a copy of `slice`.
477477
///
478478
/// # Examples
479479
/// ```rust
@@ -494,7 +494,8 @@ impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
494494
impl<'a> From<&'a str> for Box<str> {
495495
/// Converts a `&str` into a `Box<str>`
496496
///
497-
/// This conversion does not allocate on the heap and happens in place.
497+
/// This conversion allocates on the heap
498+
/// and performs a copy of `s`.
498499
///
499500
/// # Examples
500501
/// ```rust

0 commit comments

Comments
 (0)