We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c7a9b49 + 193b9e5 commit 2e996ffCopy full SHA for 2e996ff
src/libcollections/vec.rs
@@ -218,15 +218,9 @@ impl<T> Vec<T> {
218
}
219
220
221
- /// Creates a `Vec<T>` directly from the raw constituents.
+ /// Creates a `Vec<T>` directly from the raw components of another vector.
222
///
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
+ /// This is highly unsafe, due to the number of invariants that aren't checked.
230
231
/// # Example
232
0 commit comments