rust/library/core/src/ptr
bors 0fe8f3454d Auto merge of #137412 - scottmcm:redo-swap, r=cuviper
Ensure `swap_nonoverlapping` is really always untyped

This replaces #134954, which was arguably overcomplicated.

## Fixes #134713

Actually using the type passed to `ptr::swap_nonoverlapping` for anything other than its size + align turns out to not work, so this goes back to always erasing the types down to just bytes.

(Except in `const`, which keeps doing the same thing as before to preserve `@RalfJung's` fix from #134689)

## Fixes #134946

I'd previously moved the swapping to use auto-vectorization *on bytes*, but someone pointed out on Discord that the tail loop handling from that left a whole bunch of byte-by-byte swapping around.  This goes back to manual tail handling to avoid that, then still triggers auto-vectorization on pointer-width values.  (So you'll see `<4 x i64>` on `x86-64-v3` for example.)
2025-04-10 20:19:11 +00:00
..
alignment.rs library: Use size_of from the prelude instead of imported 2025-03-06 20:20:38 -08:00
const_ptr.rs replace version placeholder 2025-04-09 12:29:59 +01:00
metadata.rs Rollup merge of #135080 - Enselic:debug-ptr-metadata, r=thomcc 2025-03-16 13:19:51 +08:00
mod.rs Ensure swap_nonoverlapping is really always untyped 2025-04-09 09:09:37 -07:00
mut_ptr.rs replace version placeholder 2025-04-09 12:29:59 +01:00
non_null.rs replace version placeholder 2025-04-09 12:29:59 +01:00
unique.rs Expose Unique::from<NonNull> in const internally 2025-03-26 20:46:07 +00:00