We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5561d7b commit ddc536cCopy full SHA for ddc536c
src/libcollections/vec.rs
@@ -370,7 +370,8 @@ impl<T> Vec<T> {
370
/// * `capacity` needs to be the capacity that the pointer was allocated with.
371
///
372
/// Violating these may cause problems like corrupting the allocator's
373
- /// internal datastructures.
+ /// internal datastructures. For example it is **not** safe
374
+ /// to build a `Vec<u8>` from a C pointer to a char array and a `size_t`.
375
376
/// The ownership of `ptr` is effectively transferred to the
377
/// `Vec<T>` which may then deallocate, reallocate or change the
0 commit comments