rust/library/core/src
Stuart Cook bbd30b5476
Rollup merge of #134689 - RalfJung:ptr-swap-test, r=oli-obk
core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets

Ensure that the pointer gets swapped correctly even if it is not stored at an aligned offset. This rules out implementations that copy things in a `usize` loop -- so our implementation needs to be adjusted to avoid such a loop when running in const context.

Part of https://github.com/rust-lang/rust/issues/133668
2024-12-24 14:05:22 +11:00
..
alloc stabilize const_{size,align}_of_val 2024-12-02 20:18:25 +01:00
array Add '<[T]>::as_array', '<[T]>::as_mut_array', '<*const [T]>::as_array', and '<*mut [T]>::as_mut_array' conversion methods; 2024-11-26 21:49:28 +01:00
ascii Add more precondition check tests 2024-10-09 19:34:27 -04:00
async_iter Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
cell Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
char update cfgs 2024-11-27 15:14:54 +00:00
clone CloneToUninit: use a private specialization trait 2024-07-29 20:44:43 +03:00
cmp Use generic NonZero everywhere in core. 2024-02-22 15:17:33 +01:00
convert rustdoc-search: let From and Into be unboxed 2024-12-13 11:05:30 -07:00
ffi Add references to the specific ABI documents 2024-12-10 08:33:29 -08:00
fmt Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
future split up #[rustc_deny_explicit_impl] attribute 2024-12-20 16:57:14 +01:00
hash stabilize const_collections_with_hasher and build_hasher_default_const_new 2024-12-02 16:34:39 +01:00
intrinsics core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets in the type 2024-12-23 16:24:45 +01:00
io Add BorrowedBuf::into_filled{,_mut} methods to allow returning buffer with original lifetime 2024-11-02 14:26:21 -04:00
iter Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
macros Revert "Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser" 2024-12-23 12:30:37 +11:00
mem Rollup merge of #134583 - Enselic:maybe-uninit-transmute, r=workingjubilee 2024-12-22 21:59:24 +01:00
net fix typos in the example code in the doc comments of Ipv4Addr::from_bits(), Ipv6Addr::from_bits() & Ipv6Addr::to_bits() 2024-12-20 11:47:02 +08:00
num Fix typo in uint_macros.rs 2024-12-17 14:43:22 +01:00
ops Stabilize async closures 2024-12-13 00:04:56 +00:00
panic replace placeholder version 2024-11-27 12:10:21 +00:00
prelude Stabilize the Rust 2024 prelude 2024-12-11 13:09:57 -08:00
ptr core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets in the type 2024-12-23 16:24:45 +01:00
range Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
slice Auto merge of #130733 - okaneco:is_ascii, r=scottmcm 2024-12-22 02:44:13 +00:00
str Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
sync Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
task Use field init shorthand where possible 2024-12-17 14:33:10 -08:00
unicode Reformat Python code with ruff 2024-12-04 23:03:44 +01:00
any.rs Fixes safety docs for dyn Any + Send {+ Sync} 2024-12-22 21:38:23 +02:00
arch.rs Add core::arch::breakpoint and test 2024-12-02 23:56:24 -08:00
ascii.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
asserting.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
bool.rs Add doc alias 'then_with' for then method on bool 2024-12-03 09:20:34 +02:00
borrow.rs Suggest borrowing on fn argument that is impl AsRef 2024-05-09 23:25:31 +00:00
cell.rs Implement PointerLike for isize, NonNull, Cell, UnsafeCell, and SyncUnsafeCell. 2024-12-22 11:18:56 -08:00
clone.rs Make CloneToUninit dyn-compatible 2024-11-12 15:08:41 -06:00
cmp.rs Revert "Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser" 2024-12-23 12:30:37 +11:00
default.rs update cfgs 2024-09-05 17:24:01 +01:00
error.md Mention core's PanicInfo in error.md. 2024-06-11 15:47:00 +02:00
error.rs Update includes in '/library/core/src/error.rs'; 2024-12-13 12:46:20 +01:00
escape.rs Optimize escape_ascii 2024-10-09 17:17:50 -04:00
hint.rs feat: clarify how to use black_box() 2024-12-12 13:54:17 -05:00
internal_macros.rs Fix doc nits 2024-07-26 13:26:33 +01:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Revert "Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser" 2024-12-23 12:30:37 +11:00
marker.rs Rollup merge of #134642 - kpreid:pointerlike-cell, r=compiler-errors 2024-12-22 21:59:27 +01:00
option.rs Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
panic.rs update cfgs 2024-11-27 15:14:54 +00:00
panicking.rs update cfgs 2024-11-27 15:14:54 +00:00
pat.rs Rename core_pattern_type and core_pattern_types lib feature gates to pattern_type_macro 2024-12-04 16:16:24 +00:00
pin.rs Auto merge of #133533 - BoxyUwU:bump-boostrap, r=jieyouxu,Mark-Simulacrum 2024-11-29 22:39:10 +00:00
primitive.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
primitive_docs.rs Use &raw for ptr primitive docs 2024-12-21 15:47:44 -05:00
random.rs random: add tracking issue, address other comments 2024-09-23 10:36:16 +02:00
range.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
result.rs Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
time.rs get rid of a whole bunch of unnecessary rustc_const_unstable attributes 2024-11-02 09:59:55 +01:00
tuple.rs update cfgs 2024-09-05 17:24:01 +01:00
ub_checks.rs update cfgs 2024-11-27 15:14:54 +00:00
unit.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00
unsafe_binder.rs Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators 2024-12-12 16:29:40 +00:00