Skip to content

Commit 5f0250d

Browse files
author
gitbot
committed
Squashed 'library/' changes from 78fc550..66e2be9
66e2be9 [create-pull-request] automated change 9659a8f Add real safety comments 637c235 Go back to `Some` instead of transmuting to it. 0d8b61d Save another BB by using `SubUnchecked` instead of a call to `arith_offset` b205212 Simplify `slice::Iter::next` enough that it inlines 2cc53b1 stabilize `inherent_str_constructors` 6a122c3 Synchronize platform adaptors for OsString/OsStr 738d939 Simplify control flow with while-let 1fd98ec Improve WTF-8 comments e13a9d7 Remove ignored `#[must_use]` attributes from portable-simd e1cd0f7 Use more explicit and reliable ptr select in sort impls bae11d0 Impl TryFrom<Vec<u8>> for String 540d43e add MAX_LEN_UTF8 and MAX_LEN_UTF16 constants 10e2309 Stabilize file_lock 93ebf36 Update library/std/src/fs.rs aa3b6e2 Update fs.rs b53101c Improve instant docs 8038ba9 Stabilize const_slice_flatten 25397e0 Fix typo in hidden internal docs of `TrustedRandomAccess` 9845e75 Stabilize (and const-stabilize) `integer_sign_cast` 7bb85a3 fix docs for inherent str constructors b0e1b71 Reorder "This lock may be advisory or mandatory." earlier in the lock docs bfa42ea Clarify that locking on Windows also works for files opened with `.read(true)` 8b65e23 Document that locking a file fails on Windows if the file is opened only for append b9551d7 Reword file lock documentation to clarify advisory vs mandatory 8e8f547 add last std diagnostic items for clippy 16a1a0e Remove std::os::wasi::fs::FileExt::tell 40e2254 tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg ee7fd07 Make ub_check message clear that it's not an assert 6090430 Use tell for <File as Seek>::stream_position 49e336d Restrict DerefPure for Cow<T> impl to T = impl Clone, [impl Clone], str. 60af2b2 invalid_from_utf8[_unchecked]: also lint inherent methods ae7158e Fix &&str and trailing commas in io::const_error! ff83c22 Use io::const_error! when possible over io::Error::new 2092d68 Add an example for std::error::Error b1c35cd proc_macro: Apply unsafe_op_in_unsafe_fn cfa2c51 std: Apply unsafe_op_in_unsafe_fn 561a39c Fix safety of windows uwp functions c59047c unwind: Apply unsafe_op_in_unsafe_fn 98d41fb panic_unwind: Apply unsafe_op_in_unsafe_fn 434e41b panic_abort: Apply unsafe_op_in_unsafe_fn b13c0f5 core: Apply unsafe_op_in_unsafe_fn 1d1fe2f docs: fix broken intra-doc links that never worked 3843c9a Forward all default methods for I/O impls 82974d6 Windows: Update generated bindings to 0.59 81a8af4 Add safe new to NotAllOnes b2dc37a Implement Extend<AsciiChar> for String 124efd4 re-export `core::iter::FromCoroutine` 546b26b Implement `f{16,32,64,128}::{erf,erfc}` dcfe45d std: Apply deprecated_safe_2024 ddc018f test: Apply deprecated_safe_2024 535a1bc std: Apply fixes for tail drop expressions 261be37 std: Apply rust_2024_incompatible_pat 628f2bb std: Apply dependency_on_unit_never_type_fallback 4c64d34 std: Apply missing_unsafe_on_extern 8444cbe std: Apply unsafe_attr_outside_unsafe 38dd8f8 alloc: Apply missing_unsafe_on_extern ae6d5f3 alloc: Apply unsafe_attr_outside_unsafe c2b4dd8 alloc: Workaround hidden doctest line 1a24168 Migrate coretests to Rust 2024 4690d16 library: Update rand to 0.9.0 cb8a814 core: Apply unsafe_attr_outside_unsafe d03f408 Const-stabilize `str::is_char_boundary` and `str::split_at(_mut)(_checked)`. 842b860 alloc boxed: docs: use MaybeUninit::write instead of as_mut_ptr 198167a Use `slice::fill` in `io::Repeat` implementation 03f67f3 Remove the common prelude module 0a620bb Correct comment for FreeBSD and DragonFly BSD in unix/thread 82a5755 `transmute` should also assume non-null pointers 4da3720 Update backtrace c85ae76 expect EINVAL for pthread_mutex_destroy for aix e621217 add `IntoBounds` trait 32b4540 Stabilize `get_many_mut` as `get_disjoint_mut` 0ad3964 Fix import in bench for wasm e1ef4dc Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity c94f936 Add diagnostic item for `std::io::BufRead` d0f7728 Implement `read*_exact` for `std:io::repeat` 4a16706 std: replace the `FromInner` implementation for addresses with private conversion functions 87c8c58 Stabilize target_feature_11 a8da3dd Change swap_nonoverlapping from lang to library UB 48f5cc1 `f128` is quadruple-precision c0fa350 `f16` is half-precision 20333c9 library: amend revert of extended_varargs_abi_support for beta diff f6e2fc3 Revert "Stabilize `extended_varargs_abi_support`" 85ea8e8 Change the issue number for `likely_unlikely` and `cold_path` cbf9eb5 Update docs for impl keyword 95400ba include note on variance and example d842901 Improve examples for file locking 1964abf library: doc: core::alloc::Allocator: trivial typo fix d31aae9 stabilize `NonZero::count_ones` 627d3d8 Fix long lines which rustfmt fails to format 7dbaa04 Reword doc comment on `CoercePointeeValidated` a49b471 block coerce_pointee_validated for stabilization 4441366 rename the trait to validity and place a feature gate afront a7e895f introduce CoercePointeeWellformed for coherence checks at typeck stage e79fe45 Update `compiler-builtins` to 0.1.146 19d87a5 Merge commit '3383cfbd3572465febc7a8f816a46304373de46a' into sync-from-portable-simd-2025-01-18 39d514d ignore win_delete_self test in Miri 2c258fa Fix pattern matching mode changes and unsafe_op_in_unsafe_fn 9d3eabe Mark extern blocks as unsafe 7d525ec Rename field in OnceWith from gen to make 72d5bc5 Mark link_section attr with unsafe fceb659 Use Option for FindNextFileHandle a8f936e fix(libtest): Enable Instant on Emscripten targets a203751 Simplify Rc::as_ptr docs + typo fix f72e4cb Stabilize `vec_pop_if` 36a850b Rustfmt b707c86 occured -> occurred eb9ca61 Allow Rust to use a number of libc filesystem calls 41ec4e1 Windows: Test that deleting a running binary fails da8acb0 Update platform information for remove_file 71b9a83 Windows: remove readonly files 31a6984 Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]` 71872f3 Document `Sum::sum` returns additive identities for `[]` e0af83b Clean up 'HashMap' and 'HashSet' docs; a7c3d95 Optimize `Rc::<str>::default()` implementation 0ba6ce0 std: get rid of `sys_common::io` bf708b3 std: move `io` module out of `pal` 024d78d Move two windows process tests to tests/ui 48ff0c3 tests(std/net): remove outdated `base_port` calculation 2155f6a sys: net: Add UEFI stubs 4fafebc Remove some unnecessary parens in `assert!` conditions 2b1e844 remove use of `feature(trait_upcasting)` from core tests 960a527 Stabilise 'Cursor::{get_mut, set_position}' in 'const' scenarios; 2caf251 Stabilize `HashMap::get_many_mut` as `HashMap::get_disjoint_mut` 0cc1988 tests(std): don't output to std{out,err} in `test_creation_flags` and `test_proc_thread_attributes` 1c99519 Fix unreachable_pub lint for hermit target 88fedce Fix link in from_fn.rs 87f0a8d Use `widening_mul` 4c5ab68 Add OneSidedRangeBound to eliminate panic in `split_point_of` 3cb12e7 Rename slice::take methods to split_off 2a19d5e Update `compiler-builtins` to 0.1.145 5e344f2 specify a prim@slice in docs 23be436 implement inherent str constructors 2fa1ff1 std: move network code into `sys` 4282935 uefi: process: Add support for command environment variables f6bab15 Mark `std::fmt::from_fn` as `#[must_use]` ffd0370 Rename rustc_contract to contract 837726f Improve contracts intrisics and remove wrapper function 77e0f3b Separate contract feature gates for the internal machinery d7cdd96 Desugars contract into the internal AST extensions 17c1d2e Express contracts as part of function header and lower it to the contract lang items cc83979 contracts: added lang items that act as hooks for rustc-injected code to invoke. d0d44bb Contracts core intrinsics. f19f74f More PR feedback c1a5a6b PR feedback 74a01ad Add `unchecked_disjoint_bitor` with fallback intrinsic implementation b50f35c Add note about `FnPtr` being exposed as public bound 82d519d Add `cast_signed` and `cast_unsigned` methods for `NonZero` types 5464915 For NonZero impl macros, give unsigned impls access to the corresponding signed type eb1996d std::fs: further simplify dirent64 handling 6dc11bb add UnsafeCell direct access APIs bd77357 primitive type migration from mod.rs to primitives.rs 20ce0cb implement unstable `new_range` feature 699a603 std::range e259e2e Remove stabilized feature gate e46a9ee Move env modifying tests to a separate integration test 078d0ff Fix for SGX 3fc3318 Fix benchmarking of libstd f05d854 Move std::sync unit tests to integration tests 21811fc Move std::thread_local unit tests to integration tests 60ec747 Move std::time unit tests to integration tests 26af268 Move std::path unit tests to integration tests a3dacb7 Move std::panic unit tests to integration tests 92b0297 Move std::num unit tests to integration tests 4258cc1 Move std float unit tests to integration tests 2b81c3a Move std::error unit tests to integration tests af61137 Move std::env unit tests to integration tests e65fe17 no unsafe pointer and no overflowing_literals in fmt::Display of integers 3ca7915 black_box integer-input on fmt benches 44234cb OnceCell & OnceLock docs: Using (un)initialized consistently b242da6 Docs for f16 and f128: correct a typo and add details 9762ae9 rustc_allowed_through_unstable_modules: require deprecation message 8313a51 Update encode_utf16 to mention it is native endian e39f4d6 remove Rustc{En,De}codable from library and compiler 602901f make rustc_encodable_decodable feature properly unstable a9918e3 Fix sentence in process::abort c9b3ed8 document ptr comparison being by address 7d94b19 stabilize `once_wait` a025d22 implement all min/max fns in terms of `<`/`is_lt` 507431d improve doc tests for (min/max/minmax).* functions bc3460c docs: Documented Send and Sync requirements for Mutex + MutexGuard a1f4a4d Add documentation for derive(CoercePointee) 80a49d2 Fix off-by-one error causing driftsort to crash 0bf97b7 Insert null checks for pointer dereferences when debug assertions are enabled 46435cd atomic: extend compare_and_swap migration docs 67b5044 float::min/max: mention the non-determinism around signed 0 b71ed1d Stabilize `const_black_box` cbf5fae Improve documentation for file locking 90acbbe Remove minor future footgun in `impl Debug for MaybeUninit` be1b81d Add `AsyncFn*` to core prelude f7d4d6c uefi: Implement path b82dc96 Implement `int_from_ascii` (rust-lang#134821) d868fc6 Cleanup docs for Allocator f4a1468 btree/node.rs: pop_internal_level: does not invalidate other handles 11196e6 btree/node.rs: remove incorrect comment from pop_internal_level docs 75a88f1 add inline attribute and codegen test bec347f split slice::ptr_rotate into three separate algorithms, to hopefully help inlining b2d7b6b optimize slice::ptr_rotate for compile-time-constant small rotates 1fd4a00 Test pipes also when not running on Windows and Linux simultaneously b22931c uefi: process: Fix args a7dd839 [cfg_match] Document the use of expressions 9e0522c Update comments and sort target_arch in c_char_definition 713209d [Clippy] Add vec_reserve & vecdeque_reserve diagnostic items 2c8efe5 Fix platform-specific doc string for AtomicUsize::from_mut to be platform-independent 792aef1 Document powf and powi calls that always return 1.0 edc1313 Document purpose of closure in from_fn.rs more clearly 30b6f3b add missing allocator safety in alloc crate e0a8e29 alloc: add `#![warn(unreachable_pub)]` b603086 Implement `AtomicT::update` & `AtomicT::try_update` eddc459 fix doc for std::sync::mpmc cb9147c Implement phantom variance markers 9f01254 Clarify WindowsMut (Lending)Iterator dc8b770 compiler_fence: fix example 10da2f7 Update `std::io::{pipe, PipeReader, PipeWriter}` docs the new location ec11b38 Move `std::io::pipe` code into its own file 61ad393 Actually run the bstr test 1b0b07e Update comment ae6ec4d Put all coretests in a separate crate 4908c3e Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls fd1b45c add nto80 x86-64 and aarch64 target 865af53 Add support for QNX 7.1 with io-sock on x64 ea44fe4 Add new target for supporting Neutrino QNX 6.1 with `io-socket` network stack on aarch64 c4879d6 Update a bunch of comments from before wasi support was added ef9a210 Remove a bunch of emscripten test ignores 5780373 Fix testing of the standard library with Emscripten d400b06 fix(libtest): Deprecate '--logfile' 1a57819 docs: fix typo in std::pin overview 1c07885 ports last few library files to new intrinsic style e89ec19 Improve and expand documentation of pipes 2f4de4c Fix set_name in thread mod for NuttX 14be996 Fix `FormattingOptions` instantiation with `Default` 34825d1 Update library/core/src/num/nonzero.rs 1e23347 Add memory layout documentation to generic NonZero<T> 1602456 Fix whitespace 9ede4ca document order of items in iterator from drain c1fa845 Add `File already exists` error doc to `hard_link` function 0e739fc Doc difference between extend and extend_from_slice 0ca69a8 Make `Vec::pop_if` a bit more presentable 3e54ec3 Implement `VecDeque::pop_front_if` & `VecDeque::pop_back_if` ea5024a remove pointless allowed_through_unstable_modules on TryFromSliceError 605de59 test: add `#![warn(unreachable_pub)]` 1d7d946 proc_macro: add `#![warn(unreachable_pub)]` 80e28e4 Implement `CloneToUninit` for `ByteStr` 24148c1 Add doc aliases for BStr and BString 20d39ed Omit some more `From` impls to avoid inference failures a612daa Support `no_rc`, `no_sync`, and `no_global_oom_handling` f9119ac Add `#[cfg(not(test))]` to some impls to work around rust-lang#135100 0887a50 Implement `ByteStr` and `ByteString` types 34eb4d2 Remove erroneous `unsafe` in `BTreeSet::upper_bound_mut` d21e786 Library: Finalize dyn compatibility renaming 61ffb13 Remove test panic from File::open 15fc31a fix OsString::from_encoded_bytes_unchecked description a6d20f1 Add an example of using `carrying_mul_add` to write wider multiplication 20521e8 Outline panicking code for `LocalKey::with` 6469422 core: `#[allow(unreachable_pub)]` on unreachable `pub use` f568077 core: add `#![warn(unreachable_pub)]` 382ca00 rtstartup: add `#![warn(unreachable_pub)]` ea2043a panic_unwind: add `#![warn(unreachable_pub)]` 9c17b25 Recognise new IPv6 documentation range from RFC9637 fe6dc5f 1. Removed 'rustc_nounwind' 2. Rewording of comments de39275 Export likely(), unlikely() and cold_path() in std::hint a226ef6 Correct counting to four in cell module docs a32e5fd doc: Point to methods on `Command` as alternatives to `set/remove_var` 39027cd wasi/io: remove dead files 82e8d56 remove unnecessary rustc_allowed_through_unstable_modules b0e49a1 further improve panic_immediate_abort by removing rtprintpanic messages 3e91cd5 cargo update cf87e45 Rewrap following accepting review suggestions from @ibraheemdev c9108d3 Update library/core/src/slice/mod.rs 0f8772e Update library/core/src/slice/mod.rs 7d1b3bb Update library/core/src/slice/mod.rs c8a8fcd Update library/core/src/slice/mod.rs 13d7d87 Update library/core/src/slice/mod.rs 7195edb Update library/core/src/slice/mod.rs 1db7270 Update library/core/src/slice/mod.rs ad0fb20 Update library/core/src/slice/mod.rs 0455904 Update library/core/src/slice/mod.rs 2801eae Update library/core/src/slice/mod.rs 2b4a63a `then be` -> `be` based on feedback from @ibraheemdev 6a66627 Improve `select_nth_unstable` documentation clarity 957ecf6 Revert "Auto merge of rust-lang#134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 0d7e224 Add references to the IEEE functions for `float_next_up_down` 03415ac Stabilize `float_next_up_down` 8324d0f Fix import of pipe in kernel_copy.rs 4b314c8 Move `std::pipe::*` into `std::io` ec36e60 Clarify note in `std::sync::LazyLock` example 1f01457 fix typo in library/alloc/src/sync.rs f1201d3 Add missing safety descriptions to Arc's 'from_raw','increment_strong_count','decrement_strong_count' 437ce7d Adjust syntax 4075b74 Less unsafe in `dangling`/`without_provenance` efa1050 fix typo in typenames of pin documentation 244eebf intrinsics: deprecate calling them via the unstable std::intrinsics path 2711c59 add comments explaining main thread identification d1eb3e2 std: lazily allocate the main thread handle 6189679 Revert "Remove the Arc rt::init allocation for thread info" 43c13a0 Update ReadDir::next in std::sys::pal::unix::fs to use `&raw const (*ptr).field` instead of `ptr.offset(...).cast()`. 07d71f3 Update compiler-builtins to 0.1.143 bec8b9b Rename `pos` to `position` 0140091 Convert `struct FromBytesWithNulError` into enum 1675cfd Enforce syntactical stability of const traits in HIR 74026b2 Update compiler-builtins to 0.1.141 67611eb Add another `Vec::splice` example e458f1f avoid nesting the user-defined main so deeply on the stack 41cba85 use a single large catch_unwind in lang_start c46d8fc uefi: helpers: Introduce OwnedDevicePath 65929e4 path: Move is_absolute check to sys::path 8643c20 Update the explanation for why we use box_new in vec! dc11efe Add #[inline] to copy_from_slice bdbaf30 Add inherent versions of MaybeUninit methods for slices 1221f7d Make UniqueRc invariant for soundness a7b29a2 update and clarify StructuralPartialEq docs 6bbb7b7 Use `NonNull::without_provenance` within the standard library 8d594f5 Initial fs module for uefi ff523e3 Improve the safety documentation on new_unchecked b7ade4b Update a bunch of library types for MCP807 663d81b alloc: remove unsound `IsZero` for raw pointers 1e8b352 Fix `proc_macro::quote!` for raw ident 375ffc3 Append `TokenTree` with `ToTokens` in `proc_macro::quote!` e75d503 Rename the internal simpler `quote` macro to `minimal_quote` e8273f9 Used pthread name functions returning result for FreeBSD and DragonFly 26038c4 Fix ptr::from_ref documentation example comment e6409dc Improve prose around `as_slice` example of IterMut ded819d fmt 847e968 update cfg(bootstrap) 72bca2a update version placeholders e7bcb4b Remove some unnecessary `.into()` calls 6e4ab61 add missing provenance APIs on NonNull d55d77b More compelling env_clear() examples 91d663b Implement Condvar::wait_timeout for targets without threads 323eb3d Impl String::into_chars c834210 Avoid naming variables `str` 97e67ed [generic_assert] Constify methods used by the formatting system f2491a9 Add support for wasm exception handling to Emscripten target a95cb4e chore: remove redundant words in comment dc5513a Add doc aliases for `libm` and IEEE names c8bec15 Mark `slice::reverse` unstably const e35801e Clarified the documentation on core::iter::from_fn and core::iter::successors 032ac49 library: fix adler{-> 2}.debug 0d30907 add regression test for unsound Flatten/FlatMap specialization 1ef2bab do not in-place-iterate over flatmap/flatten 703c415 Fix UWP build 931a228 Bump backtrace to 0.3.75 ed9438e sync to actual dep verions of backtrace 2d917cd turn rustc_box into an intrinsic 465763c core: use public method instead of instrinsic 0f89725 core: improve comments 27991d0 core: implement `bool::select_unpredictable` c90ae07 Switch rtems target to panic unwind 9af5bc5 path in detail 25d8055 Move some things to `std::sync::poison` and reexport them in `std::sync` 6f5256d Bump backtrace to rust-lang/backtrace-rs@4d7906b 8985f1c Try to write the panic message with a single `write_all` call 3ce3e3f fix doc for missing Box allocator consistency 877f5f2 Remove qualification of `std::cmp::Ordering` in `Ord` doc 4f03c3b std::fs::DirEntry.metadata(): prefer use of lstat() on Emscripten fdccb97 Avoid use of LFS64 symbols on Emscripten 8db7149 char to_digit: avoid unnecessary casts to u64 7065887 Remove allowing static_mut_refs lint 9848b4f Tidy up bigint mul methods 06089cb fix doc for read write unaligned in zst operation f33a2b0 Avoid short writes in LineWriter 50e6b44 ptr docs: make it clear that we are talking only about memory accesses 1503868 Make slice::as_flattened_mut unstably const 0999de9 rename typed_swap → typed_swap_nonoverlapping c9861eb stabilize const_swap 63e5b18 fix: typos 3ae5701 Fix sentence fragment in `pin` module docs e09242c docs: inline `alloc::ffi::c_str` types to `alloc::ffi` 6c8b0fc Fix compilation issues on other unixes 52dd1c7 Eliminate redundant statx syscalls 67aee60 Unify fs::copy and io::copy 0042836 Update `compiler-builtins` to 0.1.140 300be34 Update library/alloc/tests/sort/tests.rs 2d276a6 Fix typos 5c87b22 Override `carrying_mul_add` in cg_llvm c0a001d Move `{widening, carrying}_mul` to an intrinsic with fallback MIR 2025e68 Fix mistake in windows file open 9d91aff Windows: Use WriteFile to write to a UTF-8 console 9393f29 ptr::copy: fix docs for the overlapping case d722151 Fix renaming symlinks on Windows 6f687cf docs: inline `core::ffi::c_str` types to `core::ffi` e0935e0 docs: inline `std::ffi::c_str` types to `std::ffi` 08e8d05 unwinding: bump version to fix asm 2673b5a docs: update code example for Iterator#rposition 2cf81be Use scoped threads in `std::sync::Barrier` examples d88a845 Fix forgetting to save statx availability on success bcf5563 Specify only that duplicates are discarded, not the order. 0a20600 Document collection `From` and `FromIterator` impls that drop duplicate keys. 5c2ef07 Add 'into_array' conversion destructors for 'Box', 'Rc', and 'Arc'; ed2c2f5 Impl FromIterator for tuples with arity 1-12 9105778 Fix formatting ba16539 stabilize const_alloc_layout 39e5416 chore: fix typos 9dc0434 Windows: Use FILE_ALLOCATION_INFO for truncation 8e94c9b Bump `stdarch` 7f5da0d core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets in the type 6357d59 Fixes safety docs for `dyn Any + Send {+ Sync}` fb5afe0 Use `#[derive(Default)]` instead of manually implementing it 65e540f Revert "Auto merge of rust-lang#130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser" b585133 Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`. 0e9eede docs: `transmute<&mut T, &mut MaybeUninit<T>>` is unsound when exposed to safe code 6172b51 docs: Permissions.readonly() also ignores root user special permissions 9ae1230 cargo update 5427b6f Delete `Rvalue::Len` 5b7854c Asserts the maximum value that can be returned from `Vec::len` 164b370 Document `PointerLike` implementation restrictions. e1f16b2 Use `&raw` for `ptr` primitive docs 544ffec Add `is_ascii` function optimized for x86-64 for [u8] 0dbe3e9 Add new implementation benchmark 1d8275d Document CTFE behavior of methods that call is_null 219e82f Correctly document is_null CTFE behavior. 54f77a5 Win: rename: Use offset_of! in struct size calculation 7d4628c Win: Remove special casing of the win7 target for `std::fs::rename` 4f93891 Win: Add test cases for renaming a directory while the target file is opened and for renaming over a non-empty directory cc606a8 Win: Use `FILE_RENAME_FLAG_POSIX_SEMANTICS` for `std::fs::rename` if available b20ac22 Less unwrap() in documentation 3fa2bfd Improve prose around into_slice example of IterMut ffd2255 Improve prose around `as_slice` example of Iter 003c15a Improve prose around basic examples of Iter and IterMut 97f36a4 Abstract `ProcThreadAttributeList` into its own struct b7a067e fix `PointerLike` docs 73e6ec4 unimplement `PointerLike` for trait objects 0aa7e07 split up `#[rustc_deny_explicit_impl]` attribute 069f71a remove reference to dangling from slice::Iter 752f302 mri: add track_caller to thread spawning methods for better backtraces 379d5df fix typos in the example code in the doc comments of `Ipv4Addr::from_bits()`, `Ipv6Addr::from_bits()` & `Ipv6Addr::to_bits()` 9d44eb3 Improve documentation of `element_offset` and related methods 4c17f4a Rename `elem_offset` to `element_offset` bbddf70 docs: Mention `spare_capacity_mut()` in `Vec::set_len` b85cbf6 build: Update libc version 5741895 fix typo in ptr/mod.rs 009f40d Stabilize `#[diagnostic::do_not_recommend]` c5909d0 Use field init shorthand where possible 4291580 fix(LazyCell): documentation of get[_mut] was wrong 9e60c05 compiler & tools dependencies: Updating allocator-api2 v0.2.20 -> v0.2.21 Updating annotate-snippets v0.11.4 -> v0.11.5 Updating anyhow v1.0.93 -> v1.0.94 Updating bstr v1.11.0 -> v1.11.1 Updating chrono v0.4.38 -> v0.4.39 Updating clap v4.5.21 -> v4.5.23 Updating clap_builder v4.5.21 -> v4.5.23 Updating clap_complete v4.5.38 -> v4.5.39 Updating clap_lex v0.7.3 -> v0.7.4 Updating colored v2.1.0 -> v2.2.0 Updating console v0.15.8 -> v0.15.10 Updating crossbeam-channel v0.5.13 -> v0.5.14 Updating crossbeam-deque v0.8.5 -> v0.8.6 Updating crossbeam-utils v0.8.20 -> v0.8.21 Updating encode_unicode v0.3.6 -> v1.0.0 Updating fastrand v2.2.0 -> v2.3.0 Updating home v0.5.9 -> v0.5.11 Updating js-sys v0.3.74 -> v0.3.76 Updating libc v0.2.167 -> v0.2.168 Updating miniz_oxide v0.8.0 -> v0.8.1 Updating pest v2.7.14 -> v2.7.15 Updating pest_derive v2.7.14 -> v2.7.15 Updating pest_generator v2.7.14 -> v2.7.15 Updating pest_meta v2.7.14 -> v2.7.15 Updating redox_syscall v0.5.7 -> v0.5.8 Updating rustc-stable-hash v0.1.0 -> v0.1.1 Updating rustix v0.38.41 -> v0.38.42 Updating self_cell v1.0.4 -> v1.1.0 Updating semver v1.0.23 -> v1.0.24 Updating serde v1.0.215 -> v1.0.216 Updating serde_derive v1.0.215 -> v1.0.216 Adding thiserror v2.0.7 Adding thiserror-impl v2.0.7 Updating time v0.3.36 -> v0.3.37 Updating time-macros v0.2.18 -> v0.2.19 Updating tokio v1.41.1 -> v1.42.0 Updating wasm-bindgen v0.2.97 -> v0.2.99 Updating wasm-bindgen-backend v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro v0.2.97 -> v0.2.99 Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99 Updating wasm-bindgen-shared v0.2.97 -> v0.2.99 Updating wasm-encoder v0.221.0 -> v0.221.2 Updating wasmparser v0.221.0 -> v0.221.2 Updating wast v221.0.0 -> v221.0.2 Updating wat v1.221.0 -> v1.221.2 4604487 Fix typo in uint_macros.rs 811b9df remove obsolete comment and pub(super) visibility 1878248 remove bounds from vec and linkedlist ExtractIf 97be6f0 Add a range argument to vec.extract_if 9a0038d Stabilize #[coverage] attribute b741d45 Remove `rustc::existing_doc_keyword` lint. 8b11331 Move `doc(keyword = "while")`. f30b7f5 rustdoc-search: let From and Into be unboxed d5481bd Replace i32 by char in `split_at` & `_unchecked` 5ce492f Add clarity to the "greater" of `VecDeque::insert` b051e59 Replace i32 by char to add clarity 13247c3 Add value accessor methods to `Mutex` and `RwLock` bfdea0d std::net: Solaris supports `SOCK_CLOEXEC` as well since 11.4. e3cd951 UniqueRc: platform-specific AsFd/Handle/etc impls to mirror Rc 15a416e UniqueRc: PinCoerceUnsized and DerefPure 2acb4a9 UniqueRc: comparisons and Hash 60d340e UniqueRc: Add more trait impls. a545f10 Remove support for specializing ToString outside the standard library a431182 Correct spelling of CURRENT_RUSTC_VERSION 1fc7e64 Add documentation for anonymous pipe module 7ac9e4e feat: clarify how to use `black_box()` 7bdab19 Update includes in '/library/core/src/error.rs'; 483f29b Fix building `std` for Hermit after `c_char` change 95c9943 Fix `Path::is_absolute` on Hermit 9842436 Fix typos in docs on provenance 662651e Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators 6106000 Switch inline(always) in core/src/fmt/rt.rs to plain inline 94a17a1 Reword prelude for AsyncFn stabilization b7557fb Stabilize async closures f9dc6c2 Remove consteval note from <*mut T>::align_offset docs. 5703605 Stabilize the Rust 2024 prelude 2f133af Forbid unsafe_op_in_unsafe_fn in hurd-specific os and sys files b1ea93b Move some alloc tests to the alloctests crate 2402d95 control libunwind linkage mode via `crt-static` on gnullvm targets 7409f62 Change `GetManyMutError` to match T-libs-api decision ef04404 Add references to the specific ABI documents 4e4c7eb Remove l4re from the unsigned char operating system list 63e830b De-duplicate and improve definition of core::ffi::c_char 41dac82 Add a note saying that `{u8,i8}::from_{be,le,ne}_bytes` is meaningless fa0e286 stabilize const_nonnull_new 18385c2 Remove rustc_const_stable attribute on const NOOP 4969f3a Add libc funcitons only for wasm32-wasip1-threads. f11fc28 Fix compilation for wasm32-wasip1 (without threads). 77f110a Use UNIX thread_local implementation for WASI. 3d8fd5a Run TLS destructors for wasm32-wasip1-threads e083339 Downgrade cc 41dd1d0 Run `cargo update` and update licenses 4aa3916 chore: Improve doc comments 10ebbda Refactor ReadDir into a state machine e604eec wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next 40b1ffa docs: better examples for `std::ops::ControlFlow` 1b50981 Expand home_dir docs 938089b Add doc alias 'then_with' for `then` method on `bool` 9512517 Adds new intrinsic declaration 125f22c Define acronym for thread local storage d569c79 Add a `collect_into` tuple test case 19bded5 Don't impl Extend for 13-tuples d074abd Simplify documentation for Extend impl for tuples 63103c8 Add Extend impls for tuples of arity 1 through 12 4758813 Unbreak tidy c08c303 Stabilize `std::io::ErrorKind::QuotaExceeded` c02ee66 Stabilize `std::io::ErrorKind::CrossesDevices` 486ee9a Access members of `FormattingOptions` directly instead of via getters/setters c88e65a Removed constness for methods receiving a `&mut` parameter 454f12b Added better reason for exposing `flags` and `get_flags` as unstable ad69cc4 Formatted 485db70 Refactored FormattingOptions to use a bitmask for storing flags d53b89e Revert "Turned public+unstable+hidden functions into private functions" 6042132 Turned public+unstable+hidden functions into private functions 42b8b99 Made all fns const d8d3ac8 impl Default for fmt::FormattingOptions 79dd1f7 Fixed copy+paste error in comment 54f7fa5 fmt::FormattingOptions: Renamed `alignment` to `align` 8a971db Formatter::with_options: Use different lifetimes 0069811 Fixed another broken test 4faca18 Added struct `fmt::FormattingOptions` fd634ef Formatter: Access members via getter methods wherever possible e3d6d92 Stabilize noop_waker 77213af Improve documentation d586a4d Reformat Python code with `ruff` 1fa4a4e Improve comments for the default backtrace printer d6fb042 clarify simd_relaxed_fma non-determinism 34d6066 Teach rust core about Xtensa VaListImpl and add a custom lowering of vaarg for xtensa. fd74276 Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro` ab518c9 Allow fn pointers comparisons lint in library 30af3dc Update `NonZero` and `NonNull` to not field-project (per MCP807) 45005a6 Add `core::arch::breakpoint` and test ed81bf4 a release operation synchronizes with an acquire operation 63a5feb Update the definition of `borrowing_sub` 88cb974 stabilize const_{size,align}_of_val 5e3d288 ./x miri: fix sysroot build 894a1ae stabilize const_collections_with_hasher and build_hasher_default_const_new 8373d1b Match simd_relaxed_fma documentation to fmuladd intrinsic fd5ec2b Add simd_relaxed_fma intrinsic 5130066 Fix `f16::midpoint` const feature gate 4227b90 Use c"lit" for CStrings without unwrap 290ae82 Stabilize `const_maybe_uninit_write` 525457e Fix docs for '<[T]>::as_array'; 6f91280 Stabilize `ptr::fn_addr_eq` 403b1b4 rustc_allow_const_fn_unstable is not used in proc_macro bf0a993 get rid of a bunch of unnecessary rustc_const_unstable e554b8b remove a whole bunch of unnecessary const feature gates cd39133 add isatty alias for is_terminal ac89052 Stabilize unsigned `num_midpoint` feature d96f6ba Mark `slice::copy_from_slice` unstably const 3d493e6 Fix chaining `carrying_add`s 80d8ad8 add test for bytewise ptr::swap of a pointer fb500f5 move swap_nonoverlapping constness to separate feature gate 9b49a34 move slice::swap_unchecked constness to slice_swap_unchecked feature gate 51cb535 Add diagnostic item for `std::ops::ControlFlow` 365bd17 update link to "C++ Exceptions under the hood" blog 78992b5 fix: fix codeblocks in `PathBuf` example d5c14a8 fix: hurd build, stat64.st_fsid was renamed to st_dev a7bdb16 std: clarify comments about initialization 569393b std: refactor `pthread`-based synchronization 50d61c5 bump hashbrown version 39070c4 Fill in a `BTreeSet::entry` example ffec987 Add a tracking issue for `btree_set_entry` 769194d Add `BTreeSet` entry APIs to match `HashSet` 3151781 Implement code review e0d1d6c thread::available_parallelism for wasm32-wasip1-threads bbf02b9 changes old intrinsic declaration to new declaration 445aec2 Fix and undeprecate home_dir() 8f01339 refine mir debuginfo docs 0f1210d Doc comment custom MIR debuginfo. 4fa0e22 Stabilize `extended_varargs_abi_support` f207d6d update cfgs 0d23bce replace placeholder version 9e1630f Also use zero when referencing to capacity or length a92bfdb Use consistent wording in docs, use zero instead of 0 fe00eed Fix typos in pin.rs f511614 Share inline(never) generics across crates 3c19968 fmt 69113c0 aix: create shim for lgammaf_r 8e8f4b6 Add '<[T]>::as_array', '<[T]>::as_mut_array', '<*const [T]>::as_array', and '<*mut [T]>::as_mut_array' conversion methods; 0fab901 Remove one stray space. f88403e Update chown help with a link and adding cap warning d0d4532 Expand std::os::unix::fs::chown() doc with a warning d09c208 Add missing code examples on `LocalKey` e900cf2 Make profiler_builtins `#![no_core]` instead of just `#![no_std]` bc33ff0 Remove unnecessary `#![allow(unused_features)]` a018e4a Sort and separate lint/feature attributes in `profiler_builtins` 4fe6b74 std: update internal uses of `io::const_error!` f867119 std: expose `const_io_error!` as `const_error!` a0abf60 Constify Drop and Destruct e17c30d miri: disable test_downgrade_observe test on macOS 5558748 Shorten the `MaybeUninit` `Debug` implementation d940cbf Support ranges in `<[T]>::get_many_mut()` 3044ddd btree: add `{Entry,VacantEntry}::insert_entry` e896735 std::thread: avoid leading whitespace in some panic messages a52cf62 Added a doc test for std::path::strip_prefix git-subtree-dir: library git-subtree-split: 66e2be9
1 parent 8fe8f56 commit 5f0250d

File tree

750 files changed

+23425
-13874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

750 files changed

+23425
-13874
lines changed

Cargo.lock

+91-41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ resolver = "1"
33
members = [
44
"std",
55
"sysroot",
6+
"coretests",
67
]
78

89
exclude = [
@@ -32,7 +33,7 @@ codegen-units = 10000
3233
[profile.release.package]
3334
addr2line.debug = 0
3435
addr2line.opt-level = "s"
35-
adler.debug = 0
36+
adler2.debug = 0
3637
gimli.debug = 0
3738
gimli.opt-level = "s"
3839
miniz_oxide.debug = 0

alloc/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ edition = "2021"
1010

1111
[dependencies]
1212
core = { path = "../core" }
13-
compiler_builtins = { version = "=0.1.138", features = ['rustc-dep-of-std'] }
13+
compiler_builtins = { version = "=0.1.146", features = ['rustc-dep-of-std'] }
1414

1515
[dev-dependencies]
16-
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
17-
rand_xorshift = "0.3.0"
16+
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
17+
rand_xorshift = "0.4.0"
1818

1919
[[test]]
2020
name = "alloctests"

alloc/benches/btree/map.rs

+13-12
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ macro_rules! map_insert_rand_bench {
99
($name: ident, $n: expr, $map: ident) => {
1010
#[bench]
1111
pub fn $name(b: &mut Bencher) {
12-
let n: usize = $n;
12+
let n: u32 = $n;
1313
let mut map = $map::new();
1414
// setup
1515
let mut rng = crate::bench_rng();
1616

1717
for _ in 0..n {
18-
let i = rng.gen::<usize>() % n;
18+
let i = rng.random::<u32>() % n;
1919
map.insert(i, i);
2020
}
2121

2222
// measure
2323
b.iter(|| {
24-
let k = rng.gen::<usize>() % n;
24+
let k = rng.random::<u32>() % n;
2525
map.insert(k, k);
2626
map.remove(&k);
2727
});
@@ -57,13 +57,13 @@ macro_rules! map_from_iter_rand_bench {
5757
($name: ident, $n: expr, $map: ident) => {
5858
#[bench]
5959
pub fn $name(b: &mut Bencher) {
60-
let n: usize = $n;
60+
let n: u32 = $n;
6161
// setup
6262
let mut rng = crate::bench_rng();
63-
let mut vec = Vec::with_capacity(n);
63+
let mut vec = Vec::with_capacity(n as usize);
6464

6565
for _ in 0..n {
66-
let i = rng.gen::<usize>() % n;
66+
let i = rng.random::<u32>() % n;
6767
vec.push((i, i));
6868
}
6969

@@ -102,11 +102,11 @@ macro_rules! map_find_rand_bench {
102102
#[bench]
103103
pub fn $name(b: &mut Bencher) {
104104
let mut map = $map::new();
105-
let n: usize = $n;
105+
let n: u32 = $n;
106106

107107
// setup
108108
let mut rng = crate::bench_rng();
109-
let mut keys: Vec<_> = (0..n).map(|_| rng.gen::<usize>() % n).collect();
109+
let mut keys: Vec<_> = (0..n).map(|_| rng.random::<u32>() % n).collect();
110110

111111
for &k in &keys {
112112
map.insert(k, k);
@@ -115,9 +115,9 @@ macro_rules! map_find_rand_bench {
115115
keys.shuffle(&mut rng);
116116

117117
// measure
118-
let mut i = 0;
118+
let mut i = 0u32;
119119
b.iter(|| {
120-
let t = map.get(&keys[i]);
120+
let t = map.get(&keys[i as usize]);
121121
i = (i + 1) % n;
122122
black_box(t);
123123
})
@@ -171,7 +171,7 @@ fn bench_iteration(b: &mut Bencher, size: i32) {
171171
let mut rng = crate::bench_rng();
172172

173173
for _ in 0..size {
174-
map.insert(rng.gen(), rng.gen());
174+
map.insert(rng.random(), rng.random());
175175
}
176176

177177
b.iter(|| {
@@ -201,7 +201,7 @@ fn bench_iteration_mut(b: &mut Bencher, size: i32) {
201201
let mut rng = crate::bench_rng();
202202

203203
for _ in 0..size {
204-
map.insert(rng.gen(), rng.gen());
204+
map.insert(rng.random(), rng.random());
205205
}
206206

207207
b.iter(|| {
@@ -353,6 +353,7 @@ pub fn iter_10k(b: &mut Bencher) {
353353
}
354354

355355
#[bench]
356+
#[cfg_attr(target_os = "emscripten", ignore)] // hits an OOM
356357
pub fn iter_1m(b: &mut Bencher) {
357358
bench_iter(b, 1_000, 1_000_000);
358359
}

0 commit comments

Comments
 (0)