You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detects expressions where size_of::<T>() is used in the size argument to ptr::copy / ptr::copy_nonoverlapping / etc, where T is the type of the pointers passed in as arguments.
It should not fire if T is a different type, as it's common and correct to use this for byte copies.
copy_nonoverlapping is semantically equivalent to C's memcpy, but with the argument order swapped.
Which is slightly inaccurate, since memcpy takes the size in bytes despite accepting pointers of any type (in C, anyway — in C++ you'll have to explicitly cast to coerce to void*).