Skip to content

Commit 2e996ff

Browse files
committed
auto merge of #19306 : steveklabnik/rust/gh19269, r=nikomatsakis,brson
Fixes #19269. /cc @thestinger @mahkoh @mitsuhiko
2 parents c7a9b49 + 193b9e5 commit 2e996ff

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/libcollections/vec.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,9 @@ impl<T> Vec<T> {
218218
}
219219
}
220220

221-
/// Creates a `Vec<T>` directly from the raw constituents.
221+
/// Creates a `Vec<T>` directly from the raw components of another vector.
222222
///
223-
/// This is highly unsafe:
224-
///
225-
/// - if `ptr` is null, then `length` and `capacity` should be 0
226-
/// - `ptr` must point to an allocation of size `capacity`
227-
/// - there must be `length` valid instances of type `T` at the
228-
/// beginning of that allocation
229-
/// - `ptr` must be allocated by the default `Vec` allocator
223+
/// This is highly unsafe, due to the number of invariants that aren't checked.
230224
///
231225
/// # Example
232226
///

0 commit comments

Comments
 (0)