diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-07-18 08:13:16 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-07-18 08:13:16 +0530 |
| commit | 2ea87785becef1b0d031c9fe40c7ae17717e3b76 (patch) | |
| tree | 996d0c1c82de994e26883ada97bf615a27846e1c /src | |
| parent | 00653da41aae595604aef54be4ca78d8c6113c83 (diff) | |
| parent | 10702319872e2dddb59d1400fe74357f5a98e712 (diff) | |
| download | rust-2ea87785becef1b0d031c9fe40c7ae17717e3b76.tar.gz rust-2ea87785becef1b0d031c9fe40c7ae17717e3b76.zip | |
Rollup merge of #27081 - rick68:patch-15, r=alexcrichton
improve the 'Unsafety' section of `collections::vec::Vec::<T>::from_raw_parts`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcollections/vec.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 3848263c530..2127ac11436 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -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 |
