about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-02-26 19:22:34 +0000
committer许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com>2024-02-26 19:32:17 +0000
commita1b93e8fed23825ce319b8bba8158e2f8d5d5335 (patch)
tree46a64b75e67b1deecafaf3447c05139b75a88f35
parentb79db437dccd496948bb1819d36ed51598563a98 (diff)
downloadrust-a1b93e8fed23825ce319b8bba8158e2f8d5d5335.tar.gz
rust-a1b93e8fed23825ce319b8bba8158e2f8d5d5335.zip
Rearrange `Vec::from_raw_parts{,_in}` doc argument order to match code argument order
-rw-r--r--library/alloc/src/vec/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index b59699219eb..7e07a793a66 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -481,7 +481,7 @@ impl<T> Vec<T> {
         Self::with_capacity_in(capacity, Global)
     }
 
-    /// Creates a `Vec<T>` directly from a pointer, a capacity, and a length.
+    /// Creates a `Vec<T>` directly from a pointer, a length, and a capacity.
     ///
     /// # Safety
     ///
@@ -672,7 +672,7 @@ impl<T, A: Allocator> Vec<T, A> {
         Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 }
     }
 
-    /// Creates a `Vec<T, A>` directly from a pointer, a capacity, a length,
+    /// Creates a `Vec<T, A>` directly from a pointer, a length, a capacity,
     /// and an allocator.
     ///
     /// # Safety