mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 18:40:57 +03:00
Fix wording in RawVec::from_raw_parts(_in)
This commit is contained in:
@@ -104,7 +104,7 @@ pub fn with_capacity_zeroed(capacity: usize) -> Self {
|
||||
///
|
||||
/// The `ptr` must be allocated (on the system heap), and with the given `capacity`.
|
||||
/// The `capacity` cannot exceed `isize::MAX` for sized types. (only a concern on 32-bit
|
||||
/// systems). ZSTs may have a capacity up to `usize::MAX`.
|
||||
/// systems). ZST vectors may have a capacity up to `usize::MAX`.
|
||||
/// If the `ptr` and `capacity` come from a `RawVec`, then this is guaranteed.
|
||||
#[inline]
|
||||
pub unsafe fn from_raw_parts(ptr: *mut T, capacity: usize) -> Self {
|
||||
@@ -165,7 +165,7 @@ fn allocate_in(capacity: usize, init: AllocInit, mut alloc: A) -> Self {
|
||||
///
|
||||
/// The `ptr` must be allocated (via the given allocator `a`), and with the given `capacity`.
|
||||
/// The `capacity` cannot exceed `isize::MAX` for sized types. (only a concern on 32-bit
|
||||
/// systems). ZSTs may have a capacity up to `usize::MAX`.
|
||||
/// systems). ZST vectors may have a capacity up to `usize::MAX`.
|
||||
/// If the `ptr` and `capacity` come from a `RawVec` created via `a`, then this is guaranteed.
|
||||
#[inline]
|
||||
pub unsafe fn from_raw_parts_in(ptr: *mut T, capacity: usize, a: A) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user