about summary refs log tree commit diff
path: root/library/alloc/src/vec
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-25 16:51:03 +0200
committerGitHub <noreply@github.com>2024-08-25 16:51:03 +0200
commit7edbd6353b2f906bb8e7c4a3dfcd64b754268df0 (patch)
treee9a8efae4ea83111955df6cf157a56fc9e823fbb /library/alloc/src/vec
parent89103466d77a3ae068bab0fd17c53bf7104f627b (diff)
parent58dcd1c2e6f020369e9e9c0d8ad76435cb34a6f3 (diff)
downloadrust-7edbd6353b2f906bb8e7c4a3dfcd64b754268df0.tar.gz
rust-7edbd6353b2f906bb8e7c4a3dfcd64b754268df0.zip
Rollup merge of #129091 - RalfJung:box_as_ptr, r=Amanieu
add Box::as_ptr and Box::as_mut_ptr methods

Unstably implements https://github.com/rust-lang/libs-team/issues/355. Tracking issue: https://github.com/rust-lang/rust/issues/129090.

r? libs-api
Diffstat (limited to 'library/alloc/src/vec')
-rw-r--r--library/alloc/src/vec/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index b4e0bc5fcbe..cfd2e4a1512 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -1334,7 +1334,7 @@ impl<T, A: Allocator> Vec<T, A> {
         self.buf.ptr()
     }
 
-    /// Returns an unsafe mutable pointer to the vector's buffer, or a dangling
+    /// Returns a raw mutable pointer to the vector's buffer, or a dangling
     /// raw pointer valid for zero sized reads if the vector didn't allocate.
     ///
     /// The caller must ensure that the vector outlives the pointer this
@@ -1350,7 +1350,6 @@ impl<T, A: Allocator> Vec<T, A> {
     /// may still invalidate this pointer.
     /// See the second example below for how this guarantee can be used.
     ///
-    ///
     /// # Examples
     ///
     /// ```