From 6812ee8bcc9384ccfaa519da7f6833c21c71dc47 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Mon, 7 Oct 2024 14:58:20 +0200 Subject: [PATCH] Remove misleading doc-comment (#1836) No such guarantee exists for conversion between `Box` and `Arc` and the current [^1] implementation *always* creates a new allocation. I'm not aware of other container types for which the comment is correct. [^1]: https://doc.rust-lang.org/1.81.0/src/alloc/sync.rs.html#1950-1970 --- src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e32a78c777..56a7646cc7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2947,9 +2947,6 @@ pub unsafe trait FromZeros: TryFromBytes { /// pre-zeroed memory, using `new_box_zeroed` (or related functions) may /// have performance benefits. /// - /// Note that `Box` can be converted to `Arc` and other - /// container types without reallocation. - /// /// # Errors /// /// Returns an error on allocation failure. Allocation failure is guaranteed