1
Fork 0

extend comment

Co-authored-by: lcnr <bastian_kauschke@hotmail.de>
This commit is contained in:
Ralf Jung 2021-01-02 16:58:38 +01:00 committed by GitHub
parent db03b58f23
commit a5b89a00cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -883,7 +883,8 @@ pub const unsafe fn read_unaligned<T>(src: *const T) -> T {
#[inline] #[inline]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub unsafe fn write<T>(dst: *mut T, src: T) { pub unsafe fn write<T>(dst: *mut T, src: T) {
// We are calling the intrinsics directly to avoid function calls in the generated code. // We are calling the intrinsics directly to avoid function calls in the generated code
// as `intrinsics::copy_nonoverlapping` is a wrapper function.
extern "rust-intrinsic" { extern "rust-intrinsic" {
fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize); fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
} }