diff options
| author | Havvy <ryan.havvy@gmail.com> | 2017-09-13 01:27:41 -0700 |
|---|---|---|
| committer | Havvy <ryan.havvy@gmail.com> | 2017-09-13 04:27:40 -0700 |
| commit | 9dd2ee1942b232246bd87805c2be471af9fad20a (patch) | |
| tree | c3b833abe56ac37280d733b28632d0600f850b20 /src/liballoc | |
| parent | 7eefed392f926958233529f6c1307aa007802046 (diff) | |
| download | rust-9dd2ee1942b232246bd87805c2be471af9fad20a.tar.gz rust-9dd2ee1942b232246bd87805c2be471af9fad20a.zip | |
Fix example in transmute; add safety requirement to Vec::from_raw_parts
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/vec.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index 8141851b8c9..87b2b3f7a40 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -370,6 +370,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). + /// * `ptr`'s `T` needs to have the same size and alignment as it was allocated with. /// * `length` needs to be less than or equal to `capacity`. /// * `capacity` needs to be the capacity that the pointer was allocated with. /// |
