Skip to content

Commit

Permalink
Update vec.rs
Browse files Browse the repository at this point in the history
improve the 'Unsafety' section of `collections::vec::Vec::<T>::from_raw_parts`.
  • Loading branch information
rick68 committed Jul 17, 2015
1 parent e4e9319 commit 1070231
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcollections/vec.rs
Expand Up @@ -231,6 +231,7 @@ impl<T> Vec<T> {
///
/// * `ptr` needs to have been previously allocated via `String`/`Vec<T>`
/// (at least, it's highly likely to be incorrect if it wasn't).
/// * `length` needs to be the length that less than or equal to `capacity`.
/// * `capacity` needs to be the capacity that the pointer was allocated with.
///
/// Violating these may cause problems like corrupting the allocator's
Expand Down

0 comments on commit 1070231

Please sign in to comment.