Update library/alloc/src/vec/mod.rs

Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
Manish Goregaokar 2023-08-15 15:05:49 +00:00 committed by GitHub
parent 3809c091fc
commit 90642ad679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1220,7 +1220,7 @@ pub fn as_mut_slice(&mut self) -> &mut [T] {
/// ///
/// This method guarantees that for the purpose of the aliasing model, this method /// This method guarantees that for the purpose of the aliasing model, this method
/// does not materialize a reference to the underlying slice, and thus the returned pointer /// does not materialize a reference to the underlying slice, and thus the returned pointer
/// will remain valid when mixed with other calls to [`as_ptr`] and [`as_mut_ptr`], /// will remain valid when mixed with other calls to [`as_ptr`] and [`as_mut_ptr`].
/// Note that calling other methods that materialize mutable references to the slice, /// Note that calling other methods that materialize mutable references to the slice,
/// or references to specific elements you are planning on accessing through this pointer, /// or references to specific elements you are planning on accessing through this pointer,
/// may still invalidate this pointer. /// may still invalidate this pointer.