We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48ca6d1 commit 193b9e5Copy full SHA for 193b9e5
src/libcollections/vec.rs
@@ -195,15 +195,9 @@ impl<T> Vec<T> {
195
}
196
197
198
- /// Creates a `Vec<T>` directly from the raw constituents.
+ /// Creates a `Vec<T>` directly from the raw components of another vector.
199
///
200
- /// This is highly unsafe:
201
- ///
202
- /// - if `ptr` is null, then `length` and `capacity` should be 0
203
- /// - `ptr` must point to an allocation of size `capacity`
204
- /// - there must be `length` valid instances of type `T` at the
205
- /// beginning of that allocation
206
- /// - `ptr` must be allocated by the default `Vec` allocator
+ /// This is highly unsafe, due to the number of invariants that aren't checked.
207
208
/// # Example
209
0 commit comments