From 193b9e514c0bf004111f4df0dfa6dd7aaf21357f Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Tue, 25 Nov 2014 11:14:33 -0500 Subject: [PATCH] Update documentation for from_raw_parts Fixes #19269. --- src/libcollections/vec.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index a3291e01942..51f07bedd2c 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -195,15 +195,9 @@ impl Vec { } } - /// Creates a `Vec` directly from the raw constituents. + /// Creates a `Vec` directly from the raw components of another vector. /// - /// This is highly unsafe: - /// - /// - if `ptr` is null, then `length` and `capacity` should be 0 - /// - `ptr` must point to an allocation of size `capacity` - /// - there must be `length` valid instances of type `T` at the - /// beginning of that allocation - /// - `ptr` must be allocated by the default `Vec` allocator + /// This is highly unsafe, due to the number of invariants that aren't checked. /// /// # Example ///