Skip to content

Commit a2dd58c

Browse files
author
gitbot
committed
Squashed 'library/' changes from 78fc550..0562ec7
0562ec7 Add real safety comments b1882aa Go back to `Some` instead of transmuting to it. 06a6f3c Save another BB by using `SubUnchecked` instead of a call to `arith_offset` fe8a60e Simplify `slice::Iter::next` enough that it inlines d1a66b8 stabilize `inherent_str_constructors` d3c07ff Synchronize platform adaptors for OsString/OsStr 4370aaa Simplify control flow with while-let 7c294f4 Improve WTF-8 comments 55efc50 Remove ignored `#[must_use]` attributes from portable-simd bb49c2b Use more explicit and reliable ptr select in sort impls cef1ddd Impl TryFrom<Vec<u8>> for String 078494d add MAX_LEN_UTF8 and MAX_LEN_UTF16 constants 6658f78 Stabilize file_lock fc9f5d5 Update library/std/src/fs.rs 6fe22af Update fs.rs 3b9457b Improve instant docs c8b225a Stabilize const_slice_flatten ded763b Fix typo in hidden internal docs of `TrustedRandomAccess` 506fc1f Stabilize (and const-stabilize) `integer_sign_cast` 1b0d7d9 fix docs for inherent str constructors f836902 Reorder "This lock may be advisory or mandatory." earlier in the lock docs 8285717 Clarify that locking on Windows also works for files opened with `.read(true)` 6a2341a Document that locking a file fails on Windows if the file is opened only for append 7bf4df0 Reword file lock documentation to clarify advisory vs mandatory 918c106 add last std diagnostic items for clippy e36d971 Remove std::os::wasi::fs::FileExt::tell dccbb28 tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg 294d842 Make ub_check message clear that it's not an assert 1923978 Use tell for <File as Seek>::stream_position 5071f67 Restrict DerefPure for Cow<T> impl to T = impl Clone, [impl Clone], str. b6d2389 invalid_from_utf8[_unchecked]: also lint inherent methods 64f1ad1 Fix &&str and trailing commas in io::const_error! 99c3dff Use io::const_error! when possible over io::Error::new 7f51728 Add an example for std::error::Error 5eb11a1 proc_macro: Apply unsafe_op_in_unsafe_fn 2c09051 std: Apply unsafe_op_in_unsafe_fn 9da88d8 Fix safety of windows uwp functions ce1c38b unwind: Apply unsafe_op_in_unsafe_fn 1dd0d31 panic_unwind: Apply unsafe_op_in_unsafe_fn 9f1a155 panic_abort: Apply unsafe_op_in_unsafe_fn 30bf7f3 core: Apply unsafe_op_in_unsafe_fn 6972c85 docs: fix broken intra-doc links that never worked 90daa9f Forward all default methods for I/O impls a359299 Windows: Update generated bindings to 0.59 db056a4 Add safe new to NotAllOnes 8750bb3 Implement Extend<AsciiChar> for String 00f2125 re-export `core::iter::FromCoroutine` 2f83b61 Implement `f{16,32,64,128}::{erf,erfc}` a1d366c std: Apply deprecated_safe_2024 904d1bd test: Apply deprecated_safe_2024 e0666e6 std: Apply fixes for tail drop expressions 6c4ee0d std: Apply rust_2024_incompatible_pat fd7a458 std: Apply dependency_on_unit_never_type_fallback 6a0386e std: Apply missing_unsafe_on_extern 095c3e9 std: Apply unsafe_attr_outside_unsafe f9df76e alloc: Apply missing_unsafe_on_extern c43fd7d alloc: Apply unsafe_attr_outside_unsafe bb25d99 alloc: Workaround hidden doctest line 7a786cb Migrate coretests to Rust 2024 a019f12 library: Update rand to 0.9.0 5ada489 core: Apply unsafe_attr_outside_unsafe 55a40e0 Const-stabilize `str::is_char_boundary` and `str::split_at(_mut)(_checked)`. e7f6d4e alloc boxed: docs: use MaybeUninit::write instead of as_mut_ptr 4321ba7 Use `slice::fill` in `io::Repeat` implementation 1df5c02 Remove the common prelude module 227c9ee Correct comment for FreeBSD and DragonFly BSD in unix/thread 86202ab `transmute` should also assume non-null pointers 38d556d Update backtrace 6588723 expect EINVAL for pthread_mutex_destroy for aix 613e39a add `IntoBounds` trait eab34f5 Stabilize `get_many_mut` as `get_disjoint_mut` 881dc9b Fix import in bench for wasm 3c650f5 Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity c8c6c27 Add diagnostic item for `std::io::BufRead` 79e702e Implement `read*_exact` for `std:io::repeat` e5dd566 std: replace the `FromInner` implementation for addresses with private conversion functions 45328f4 Stabilize target_feature_11 871c3ea Change swap_nonoverlapping from lang to library UB 7d06538 `f128` is quadruple-precision 1e32fb2 `f16` is half-precision 9877cde library: amend revert of extended_varargs_abi_support for beta diff 967368c Revert "Stabilize `extended_varargs_abi_support`" 9c88d83 Change the issue number for `likely_unlikely` and `cold_path` 9543f5c Update docs for impl keyword 5e0be4e include note on variance and example ba855ca Improve examples for file locking 7e0bf79 library: doc: core::alloc::Allocator: trivial typo fix 404b9d5 stabilize `NonZero::count_ones` bcedb24 Fix long lines which rustfmt fails to format 374116d Reword doc comment on `CoercePointeeValidated` ce94806 block coerce_pointee_validated for stabilization 9e89768 rename the trait to validity and place a feature gate afront 158e7e0 introduce CoercePointeeWellformed for coherence checks at typeck stage 5191378 Update `compiler-builtins` to 0.1.146 e5c54de Merge commit '3383cfbd3572465febc7a8f816a46304373de46a' into sync-from-portable-simd-2025-01-18 e6a23ec ignore win_delete_self test in Miri 0c59599 Fix pattern matching mode changes and unsafe_op_in_unsafe_fn 6d60394 Mark extern blocks as unsafe a954978 Rename field in OnceWith from gen to make aa6dca1 Mark link_section attr with unsafe 4422f5c Use Option for FindNextFileHandle 6e014a1 fix(libtest): Enable Instant on Emscripten targets f2d27f1 Simplify Rc::as_ptr docs + typo fix 66b68e4 Stabilize `vec_pop_if` 624e549 Rustfmt 23746b9 occured -> occurred 84d85f7 Allow Rust to use a number of libc filesystem calls 2777961 Windows: Test that deleting a running binary fails 514cc6f Update platform information for remove_file 58432e9 Windows: remove readonly files 3b68c8e Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]` 0a013e5 Document `Sum::sum` returns additive identities for `[]` bd88374 Clean up 'HashMap' and 'HashSet' docs; 074f098 Optimize `Rc::<str>::default()` implementation 0d9968b std: get rid of `sys_common::io` 5af2098 std: move `io` module out of `pal` c768dfb Move two windows process tests to tests/ui e7676a4 tests(std/net): remove outdated `base_port` calculation 813a53a sys: net: Add UEFI stubs 2aa2a7e Remove some unnecessary parens in `assert!` conditions 79325e1 remove use of `feature(trait_upcasting)` from core tests 176cb90 Stabilise 'Cursor::{get_mut, set_position}' in 'const' scenarios; acf35f9 Stabilize `HashMap::get_many_mut` as `HashMap::get_disjoint_mut` 22f16e3 tests(std): don't output to std{out,err} in `test_creation_flags` and `test_proc_thread_attributes` 671e6fe Fix unreachable_pub lint for hermit target 495335c Fix link in from_fn.rs 32eac99 Use `widening_mul` b7aeb84 Add OneSidedRangeBound to eliminate panic in `split_point_of` 7d590eb Rename slice::take methods to split_off 87797bd Update `compiler-builtins` to 0.1.145 fdb82d6 specify a prim@slice in docs c87c33b implement inherent str constructors d9f55aa std: move network code into `sys` 31d80ee uefi: process: Add support for command environment variables 5f3142e Mark `std::fmt::from_fn` as `#[must_use]` 39d9312 Rename rustc_contract to contract efb8af0 Improve contracts intrisics and remove wrapper function 5311c0b Separate contract feature gates for the internal machinery 3d0c045 Desugars contract into the internal AST extensions bbad05c Express contracts as part of function header and lower it to the contract lang items ae5caaa contracts: added lang items that act as hooks for rustc-injected code to invoke. 951ae09 Contracts core intrinsics. 6e5228b More PR feedback 5fbc756 PR feedback 88e86cb Add `unchecked_disjoint_bitor` with fallback intrinsic implementation aa60c9a Add note about `FnPtr` being exposed as public bound 7306b8c Add `cast_signed` and `cast_unsigned` methods for `NonZero` types b67e801 For NonZero impl macros, give unsigned impls access to the corresponding signed type 547e4c6 std::fs: further simplify dirent64 handling 90eb31b add UnsafeCell direct access APIs a217dc8 primitive type migration from mod.rs to primitives.rs 7b0bc23 implement unstable `new_range` feature 34e53ec std::range 5a8d904 Remove stabilized feature gate d6c07a2 Move env modifying tests to a separate integration test 8844b85 Fix for SGX 92c2922 Fix benchmarking of libstd 1981819 Move std::sync unit tests to integration tests ef062fc Move std::thread_local unit tests to integration tests 076150a Move std::time unit tests to integration tests 482d344 Move std::path unit tests to integration tests 8dd4b82 Move std::panic unit tests to integration tests 5adcd20 Move std::num unit tests to integration tests 77cedba Move std float unit tests to integration tests 9552c57 Move std::error unit tests to integration tests d90fa3b Move std::env unit tests to integration tests 49cc1a3 no unsafe pointer and no overflowing_literals in fmt::Display of integers e0f129a black_box integer-input on fmt benches 16306e6 OnceCell & OnceLock docs: Using (un)initialized consistently 96ed54a Docs for f16 and f128: correct a typo and add details 33eea01 rustc_allowed_through_unstable_modules: require deprecation message 9496787 Update encode_utf16 to mention it is native endian 2759242 remove Rustc{En,De}codable from library and compiler 9c77cd0 make rustc_encodable_decodable feature properly unstable 475df13 Fix sentence in process::abort d5b6949 document ptr comparison being by address 426f8f5 stabilize `once_wait` 5e37876 implement all min/max fns in terms of `<`/`is_lt` 0f8a89d improve doc tests for (min/max/minmax).* functions 0ff33e2 docs: Documented Send and Sync requirements for Mutex + MutexGuard 5971e34 Add documentation for derive(CoercePointee) d720dd6 Fix off-by-one error causing driftsort to crash ec96439 Insert null checks for pointer dereferences when debug assertions are enabled ba37f31 atomic: extend compare_and_swap migration docs 51d9c2b float::min/max: mention the non-determinism around signed 0 82acff5 Stabilize `const_black_box` d4dfd00 Improve documentation for file locking f4c03a3 Remove minor future footgun in `impl Debug for MaybeUninit` cd0dcf8 Add `AsyncFn*` to core prelude b40071d uefi: Implement path ba01bde Implement `int_from_ascii` (rust-lang#134821) 5711021 Cleanup docs for Allocator 1baf15d btree/node.rs: pop_internal_level: does not invalidate other handles 1ed6d7e btree/node.rs: remove incorrect comment from pop_internal_level docs 5d1d73e add inline attribute and codegen test 0f4916b split slice::ptr_rotate into three separate algorithms, to hopefully help inlining d81c593 optimize slice::ptr_rotate for compile-time-constant small rotates 9601b1e Test pipes also when not running on Windows and Linux simultaneously 1b41ddc uefi: process: Fix args 0c3cce3 [cfg_match] Document the use of expressions 1902c9b Update comments and sort target_arch in c_char_definition b2c0641 [Clippy] Add vec_reserve & vecdeque_reserve diagnostic items 756ed69 Fix platform-specific doc string for AtomicUsize::from_mut to be platform-independent b82b23f Document powf and powi calls that always return 1.0 58eb501 Document purpose of closure in from_fn.rs more clearly 1a44d2d add missing allocator safety in alloc crate a2d218d alloc: add `#![warn(unreachable_pub)]` c341d39 Implement `AtomicT::update` & `AtomicT::try_update` cc9a322 fix doc for std::sync::mpmc 528084f Implement phantom variance markers d893307 Clarify WindowsMut (Lending)Iterator db17d14 compiler_fence: fix example fa85ea6 Update `std::io::{pipe, PipeReader, PipeWriter}` docs the new location c4f7102 Move `std::io::pipe` code into its own file 071fcf3 Actually run the bstr test 773a396 Update comment 0abbad6 Put all coretests in a separate crate 69e3be4 Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls 80d0b28 add nto80 x86-64 and aarch64 target 66e84c8 Add support for QNX 7.1 with io-sock on x64 d88c7e3 Add new target for supporting Neutrino QNX 6.1 with `io-socket` network stack on aarch64 37f7349 Update a bunch of comments from before wasi support was added 46cb1bf Remove a bunch of emscripten test ignores 0d32266 Fix testing of the standard library with Emscripten 72caa7e fix(libtest): Deprecate '--logfile' f7d8311 docs: fix typo in std::pin overview 6ccb8d1 ports last few library files to new intrinsic style 3d95f08 Improve and expand documentation of pipes 6138166 Fix set_name in thread mod for NuttX 0d93b96 Fix `FormattingOptions` instantiation with `Default` 8a4225e Update library/core/src/num/nonzero.rs 0e14d5b Add memory layout documentation to generic NonZero<T> fa4a7ae Fix whitespace 7c4aab9 document order of items in iterator from drain 9ba02e2 Add `File already exists` error doc to `hard_link` function 5059365 Doc difference between extend and extend_from_slice 1d1bc64 Make `Vec::pop_if` a bit more presentable 7153e80 Implement `VecDeque::pop_front_if` & `VecDeque::pop_back_if` 3ff034e remove pointless allowed_through_unstable_modules on TryFromSliceError 272069b test: add `#![warn(unreachable_pub)]` f621bcf proc_macro: add `#![warn(unreachable_pub)]` 01077f3 Implement `CloneToUninit` for `ByteStr` 8944f2e Add doc aliases for BStr and BString 8e5f538 Omit some more `From` impls to avoid inference failures 0c67c20 Support `no_rc`, `no_sync`, and `no_global_oom_handling` 631fc6d Add `#[cfg(not(test))]` to some impls to work around rust-lang#135100 7749d74 Implement `ByteStr` and `ByteString` types 6dc45b7 Remove erroneous `unsafe` in `BTreeSet::upper_bound_mut` daf2040 Library: Finalize dyn compatibility renaming c80e646 Remove test panic from File::open 2a6cb30 fix OsString::from_encoded_bytes_unchecked description 2c216cb Add an example of using `carrying_mul_add` to write wider multiplication e25e330 Outline panicking code for `LocalKey::with` d1367dc core: `#[allow(unreachable_pub)]` on unreachable `pub use` ee3a512 core: add `#![warn(unreachable_pub)]` 0a6e583 rtstartup: add `#![warn(unreachable_pub)]` 17e84b0 panic_unwind: add `#![warn(unreachable_pub)]` 2959a84 Recognise new IPv6 documentation range from RFC9637 4bf3d35 1. Removed 'rustc_nounwind' 2. Rewording of comments 11838c5 Export likely(), unlikely() and cold_path() in std::hint cc75b97 Correct counting to four in cell module docs acf924a doc: Point to methods on `Command` as alternatives to `set/remove_var` 4f3f8a8 wasi/io: remove dead files 35ba0e4 remove unnecessary rustc_allowed_through_unstable_modules 72814a3 further improve panic_immediate_abort by removing rtprintpanic messages cfa4d02 cargo update ccbe5c8 Rewrap following accepting review suggestions from @ibraheemdev af89f11 Update library/core/src/slice/mod.rs 1d0a856 Update library/core/src/slice/mod.rs 2e8de2e Update library/core/src/slice/mod.rs 198fcdd Update library/core/src/slice/mod.rs 1b3094c Update library/core/src/slice/mod.rs c2d7328 Update library/core/src/slice/mod.rs 5c4243a Update library/core/src/slice/mod.rs a0d178a Update library/core/src/slice/mod.rs 4b33637 Update library/core/src/slice/mod.rs 08f3794 Update library/core/src/slice/mod.rs e970075 `then be` -> `be` based on feedback from @ibraheemdev a23bf94 Improve `select_nth_unstable` documentation clarity ab779d8 Revert "Auto merge of rust-lang#134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 687692d Add references to the IEEE functions for `float_next_up_down` 1ab49f6 Stabilize `float_next_up_down` 2cd5266 Fix import of pipe in kernel_copy.rs bf5e38f Move `std::pipe::*` into `std::io` 959b625 Clarify note in `std::sync::LazyLock` example 1f61132 fix typo in library/alloc/src/sync.rs 4f31d3f Add missing safety descriptions to Arc's 'from_raw','increment_strong_count','decrement_strong_count' aa303b9 Adjust syntax 3353415 Less unsafe in `dangling`/`without_provenance` 77d28bd fix typo in typenames of pin documentation b4c15d1 intrinsics: deprecate calling them via the unstable std::intrinsics path 4d8c966 add comments explaining main thread identification 7da0eaf std: lazily allocate the main thread handle 2be7c9f Revert "Remove the Arc rt::init allocation for thread info" 206933c Update ReadDir::next in std::sys::pal::unix::fs to use `&raw const (*ptr).field` instead of `ptr.offset(...).cast()`. 0c73cf0 Update compiler-builtins to 0.1.143 ba3228b Rename `pos` to `position` 58fa123 Convert `struct FromBytesWithNulError` into enum 64d9279 Enforce syntactical stability of const traits in HIR 8b22e80 Update compiler-builtins to 0.1.141 4859dce Add another `Vec::splice` example 1c3dd64 avoid nesting the user-defined main so deeply on the stack 1eb9934 use a single large catch_unwind in lang_start f17f468 uefi: helpers: Introduce OwnedDevicePath 4360a7f path: Move is_absolute check to sys::path 1aaf073 Update the explanation for why we use box_new in vec! ae6e68c Add #[inline] to copy_from_slice 0c23507 Add inherent versions of MaybeUninit methods for slices d223dbb Make UniqueRc invariant for soundness a559921 update and clarify StructuralPartialEq docs 0c31e11 Use `NonNull::without_provenance` within the standard library 30cf3ab Initial fs module for uefi 6183c71 Improve the safety documentation on new_unchecked 0700a96 Update a bunch of library types for MCP807 b4b8d53 alloc: remove unsound `IsZero` for raw pointers 4a8bbbd Fix `proc_macro::quote!` for raw ident 2fc2bf8 Append `TokenTree` with `ToTokens` in `proc_macro::quote!` af9162b Rename the internal simpler `quote` macro to `minimal_quote` 240c29a Used pthread name functions returning result for FreeBSD and DragonFly 10f8df3 Fix ptr::from_ref documentation example comment 77dd1c1 Improve prose around `as_slice` example of IterMut e547adc fmt 556ab48 update cfg(bootstrap) 43a9761 update version placeholders e839c42 Remove some unnecessary `.into()` calls cc66a0d add missing provenance APIs on NonNull 4f70a0f More compelling env_clear() examples b8076f3 Implement Condvar::wait_timeout for targets without threads 3e9bbb8 Impl String::into_chars 7c9257f Avoid naming variables `str` c074f85 [generic_assert] Constify methods used by the formatting system 9744d02 Add support for wasm exception handling to Emscripten target 3cbfa9e chore: remove redundant words in comment c48f8c3 Add doc aliases for `libm` and IEEE names eec9d3a Mark `slice::reverse` unstably const b405b11 Clarified the documentation on core::iter::from_fn and core::iter::successors 5053f5c library: fix adler{-> 2}.debug ce287de add regression test for unsound Flatten/FlatMap specialization 1b67f94 do not in-place-iterate over flatmap/flatten 1d6b7b9 Fix UWP build 9dcd96c Bump backtrace to 0.3.75 8b295bd sync to actual dep verions of backtrace ea5f7f9 turn rustc_box into an intrinsic 322bf11 core: use public method instead of instrinsic 85f0b1a core: improve comments caf45fa core: implement `bool::select_unpredictable` 4cd5262 Switch rtems target to panic unwind 77f910e path in detail eca7da0 Move some things to `std::sync::poison` and reexport them in `std::sync` 93adcb8 Bump backtrace to rust-lang/backtrace-rs@4d7906b 8f4ae1c Try to write the panic message with a single `write_all` call d7844a7 fix doc for missing Box allocator consistency bd694d6 Remove qualification of `std::cmp::Ordering` in `Ord` doc 4eb5e67 std::fs::DirEntry.metadata(): prefer use of lstat() on Emscripten 0b82093 Avoid use of LFS64 symbols on Emscripten 7bdb4e9 char to_digit: avoid unnecessary casts to u64 88eb7be Remove allowing static_mut_refs lint 3e7ed5c Tidy up bigint mul methods 660b9f6 fix doc for read write unaligned in zst operation 90f7d17 Avoid short writes in LineWriter da2dddc ptr docs: make it clear that we are talking only about memory accesses 7e42feb Make slice::as_flattened_mut unstably const f595a73 rename typed_swap → typed_swap_nonoverlapping 0f4054c stabilize const_swap 7bd3ce5 fix: typos e12ff84 Fix sentence fragment in `pin` module docs 0e3a01a docs: inline `alloc::ffi::c_str` types to `alloc::ffi` e6ae67c Fix compilation issues on other unixes 4da51cd Eliminate redundant statx syscalls 14c47af Unify fs::copy and io::copy 312e2ff Update `compiler-builtins` to 0.1.140 9c0b48c Update library/alloc/tests/sort/tests.rs e571678 Fix typos 016f072 Override `carrying_mul_add` in cg_llvm 72c670a Move `{widening, carrying}_mul` to an intrinsic with fallback MIR 6b1da3c Fix mistake in windows file open 3ced2c0 Windows: Use WriteFile to write to a UTF-8 console 7d5c993 ptr::copy: fix docs for the overlapping case c9f1844 Fix renaming symlinks on Windows bbf8c27 docs: inline `core::ffi::c_str` types to `core::ffi` 30d231d docs: inline `std::ffi::c_str` types to `std::ffi` 5635206 unwinding: bump version to fix asm 3c97127 docs: update code example for Iterator#rposition 365702d Use scoped threads in `std::sync::Barrier` examples 7322217 Fix forgetting to save statx availability on success 908619c Specify only that duplicates are discarded, not the order. 4885a7b Document collection `From` and `FromIterator` impls that drop duplicate keys. e8686b9 Add 'into_array' conversion destructors for 'Box', 'Rc', and 'Arc'; 560c493 Impl FromIterator for tuples with arity 1-12 daf5a3b Fix formatting 0b8321c stabilize const_alloc_layout 532d696 chore: fix typos 7e31825 Windows: Use FILE_ALLOCATION_INFO for truncation e78b3f0 Bump `stdarch` 58bca68 core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets in the type 4222ea0 Fixes safety docs for `dyn Any + Send {+ Sync}` 45151a9 Use `#[derive(Default)]` instead of manually implementing it 1600e46 Revert "Auto merge of rust-lang#130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser" 9f6497d Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`. 8a53e23 docs: `transmute<&mut T, &mut MaybeUninit<T>>` is unsound when exposed to safe code c1f8b92 docs: Permissions.readonly() also ignores root user special permissions 36c0e86 cargo update 5aa0ab2 Delete `Rvalue::Len` 8ab6664 Asserts the maximum value that can be returned from `Vec::len` f7031a9 Document `PointerLike` implementation restrictions. c9eb204 Use `&raw` for `ptr` primitive docs 832a776 Add `is_ascii` function optimized for x86-64 for [u8] 61e4368 Add new implementation benchmark 6d66045 Document CTFE behavior of methods that call is_null 889f0a4 Correctly document is_null CTFE behavior. c3be8df Win: rename: Use offset_of! in struct size calculation 7ca358d Win: Remove special casing of the win7 target for `std::fs::rename` aea3e66 Win: Add test cases for renaming a directory while the target file is opened and for renaming over a non-empty directory b64a20d Win: Use `FILE_RENAME_FLAG_POSIX_SEMANTICS` for `std::fs::rename` if available 80bd8f0 Less unwrap() in documentation 8807104 Improve prose around into_slice example of IterMut 9460bf6 Improve prose around `as_slice` example of Iter f2cce4c Improve prose around basic examples of Iter and IterMut 22392c0 Abstract `ProcThreadAttributeList` into its own struct 8c88709 fix `PointerLike` docs 145ce5a unimplement `PointerLike` for trait objects 716df92 split up `#[rustc_deny_explicit_impl]` attribute 464b3a2 remove reference to dangling from slice::Iter 3a37084 mri: add track_caller to thread spawning methods for better backtraces 5d3f7a9 fix typos in the example code in the doc comments of `Ipv4Addr::from_bits()`, `Ipv6Addr::from_bits()` & `Ipv6Addr::to_bits()` 248ff81 Improve documentation of `element_offset` and related methods ebc257f Rename `elem_offset` to `element_offset` b2d279b docs: Mention `spare_capacity_mut()` in `Vec::set_len` b5c51dd build: Update libc version 931daf0 fix typo in ptr/mod.rs f9c0b8e Stabilize `#[diagnostic::do_not_recommend]` 3f38f7d Use field init shorthand where possible 04e5b43 fix(LazyCell): documentation of get[_mut] was wrong ae07bb0 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 8351aaa Fix typo in uint_macros.rs eee7051 remove obsolete comment and pub(super) visibility 02b1a8e remove bounds from vec and linkedlist ExtractIf 40301c2 Add a range argument to vec.extract_if 1ee2d1d Stabilize #[coverage] attribute 102bde1 Remove `rustc::existing_doc_keyword` lint. a255d48 Move `doc(keyword = "while")`. 48aed2e rustdoc-search: let From and Into be unboxed 1c56964 Replace i32 by char in `split_at` & `_unchecked` b20544a Add clarity to the "greater" of `VecDeque::insert` 0521a63 Replace i32 by char to add clarity 47962f8 Add value accessor methods to `Mutex` and `RwLock` 2192b6c std::net: Solaris supports `SOCK_CLOEXEC` as well since 11.4. 8ba808f UniqueRc: platform-specific AsFd/Handle/etc impls to mirror Rc eeeac9e UniqueRc: PinCoerceUnsized and DerefPure a7872a8 UniqueRc: comparisons and Hash 59b5e6b UniqueRc: Add more trait impls. 4d060b9 Remove support for specializing ToString outside the standard library 78ddb5a Correct spelling of CURRENT_RUSTC_VERSION 6201c26 Add documentation for anonymous pipe module 81b67aa feat: clarify how to use `black_box()` def4f6c Update includes in '/library/core/src/error.rs'; e2d5461 Fix building `std` for Hermit after `c_char` change e75f3ea Fix `Path::is_absolute` on Hermit be31965 Fix typos in docs on provenance 429fcc9 Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators a62fd40 Switch inline(always) in core/src/fmt/rt.rs to plain inline 0de7af4 Reword prelude for AsyncFn stabilization a173c52 Stabilize async closures 4d14add Remove consteval note from <*mut T>::align_offset docs. 12ab1ab Stabilize the Rust 2024 prelude 91a57d8 Forbid unsafe_op_in_unsafe_fn in hurd-specific os and sys files 64512ce Move some alloc tests to the alloctests crate d58e876 control libunwind linkage mode via `crt-static` on gnullvm targets d4c857a Change `GetManyMutError` to match T-libs-api decision face2ac Add references to the specific ABI documents 9349e01 Remove l4re from the unsigned char operating system list e2317ea De-duplicate and improve definition of core::ffi::c_char 6140cbe Add a note saying that `{u8,i8}::from_{be,le,ne}_bytes` is meaningless 4161b56 stabilize const_nonnull_new cedb8de Remove rustc_const_stable attribute on const NOOP 09ad2a8 Add libc funcitons only for wasm32-wasip1-threads. 2e9c76a Fix compilation for wasm32-wasip1 (without threads). d58e91a Use UNIX thread_local implementation for WASI. fe5eb7f Run TLS destructors for wasm32-wasip1-threads 8394b88 Downgrade cc e22fbb5 Run `cargo update` and update licenses 0997a53 chore: Improve doc comments 1fc02ee Refactor ReadDir into a state machine a7520c5 wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next 4337651 docs: better examples for `std::ops::ControlFlow` ceca1ca Expand home_dir docs 40efba8 Add doc alias 'then_with' for `then` method on `bool` c8c8bb4 Adds new intrinsic declaration b4b58f4 Define acronym for thread local storage e1984ad Add a `collect_into` tuple test case 07f82a8 Don't impl Extend for 13-tuples 64ebed6 Simplify documentation for Extend impl for tuples c756d4f Add Extend impls for tuples of arity 1 through 12 0bed82e Unbreak tidy ec99600 Stabilize `std::io::ErrorKind::QuotaExceeded` 7c4237a Stabilize `std::io::ErrorKind::CrossesDevices` 77877b6 Access members of `FormattingOptions` directly instead of via getters/setters e8004a2 Removed constness for methods receiving a `&mut` parameter 551d251 Added better reason for exposing `flags` and `get_flags` as unstable 28fd653 Formatted 20be04f Refactored FormattingOptions to use a bitmask for storing flags 89b1bc5 Revert "Turned public+unstable+hidden functions into private functions" fa6dd17 Turned public+unstable+hidden functions into private functions 768d37c Made all fns const df7891c impl Default for fmt::FormattingOptions d636071 Fixed copy+paste error in comment e2f4dec fmt::FormattingOptions: Renamed `alignment` to `align` a04e528 Formatter::with_options: Use different lifetimes 2c549b7 Fixed another broken test 128d718 Added struct `fmt::FormattingOptions` 79f295a Formatter: Access members via getter methods wherever possible 4548bae Stabilize noop_waker 763197e Improve documentation 4b50e71 Reformat Python code with `ruff` ebf9f43 Improve comments for the default backtrace printer 6d3d76e clarify simd_relaxed_fma non-determinism 2365fae Teach rust core about Xtensa VaListImpl and add a custom lowering of vaarg for xtensa. a52b934 Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro` 74062c0 Allow fn pointers comparisons lint in library 63e2ef1 Update `NonZero` and `NonNull` to not field-project (per MCP807) a7e3403 Add `core::arch::breakpoint` and test 41bcaca a release operation synchronizes with an acquire operation 99dcd60 Update the definition of `borrowing_sub` 9c76387 stabilize const_{size,align}_of_val 6948230 ./x miri: fix sysroot build 3d3b6ea stabilize const_collections_with_hasher and build_hasher_default_const_new 2a67969 Match simd_relaxed_fma documentation to fmuladd intrinsic 2c1edca Add simd_relaxed_fma intrinsic aada509 Fix `f16::midpoint` const feature gate d262773 Use c"lit" for CStrings without unwrap 585f3e9 Stabilize `const_maybe_uninit_write` c222069 Fix docs for '<[T]>::as_array'; 7c9d5d1 Stabilize `ptr::fn_addr_eq` 7251152 rustc_allow_const_fn_unstable is not used in proc_macro df2dd5c get rid of a bunch of unnecessary rustc_const_unstable e49611d remove a whole bunch of unnecessary const feature gates 364a3fc add isatty alias for is_terminal fa4608d Stabilize unsigned `num_midpoint` feature 0c291ad Mark `slice::copy_from_slice` unstably const 58e7fe7 Fix chaining `carrying_add`s ddfdc3e add test for bytewise ptr::swap of a pointer 2eb8d1c move swap_nonoverlapping constness to separate feature gate 0dd478c move slice::swap_unchecked constness to slice_swap_unchecked feature gate 9e869ad Add diagnostic item for `std::ops::ControlFlow` ddc01a7 update link to "C++ Exceptions under the hood" blog 12adcda fix: fix codeblocks in `PathBuf` example 0cd78eb fix: hurd build, stat64.st_fsid was renamed to st_dev 397d0c4 std: clarify comments about initialization d267060 std: refactor `pthread`-based synchronization b12f45e bump hashbrown version 673b90e Fill in a `BTreeSet::entry` example 5746d71 Add a tracking issue for `btree_set_entry` 842b922 Add `BTreeSet` entry APIs to match `HashSet` cc14804 Implement code review eb297dc thread::available_parallelism for wasm32-wasip1-threads 269486b changes old intrinsic declaration to new declaration a9cf29e Fix and undeprecate home_dir() 21ae330 refine mir debuginfo docs 83f5e1b Doc comment custom MIR debuginfo. 81d70f1 Stabilize `extended_varargs_abi_support` d527600 update cfgs 5be95fa replace placeholder version f16a48a Also use zero when referencing to capacity or length 9e57f48 Use consistent wording in docs, use zero instead of 0 a627341 Fix typos in pin.rs 98ed37a Share inline(never) generics across crates 969ef51 fmt 60ba952 aix: create shim for lgammaf_r e3823e1 Add '<[T]>::as_array', '<[T]>::as_mut_array', '<*const [T]>::as_array', and '<*mut [T]>::as_mut_array' conversion methods; 48ad489 Remove one stray space. 287b87d Update chown help with a link and adding cap warning c28d575 Expand std::os::unix::fs::chown() doc with a warning 0d92478 Add missing code examples on `LocalKey` 3c3ed68 Make profiler_builtins `#![no_core]` instead of just `#![no_std]` 9d1ee9b Remove unnecessary `#![allow(unused_features)]` 576953f Sort and separate lint/feature attributes in `profiler_builtins` 80e2212 std: update internal uses of `io::const_error!` 29aeba4 std: expose `const_io_error!` as `const_error!` 0816de3 Constify Drop and Destruct c240b82 miri: disable test_downgrade_observe test on macOS 30ea972 Shorten the `MaybeUninit` `Debug` implementation 9ff30fb Support ranges in `<[T]>::get_many_mut()` 968e683 btree: add `{Entry,VacantEntry}::insert_entry` 41fdf9c std::thread: avoid leading whitespace in some panic messages 3094cbc Added a doc test for std::path::strip_prefix git-subtree-dir: library git-subtree-split: 0562ec7
1 parent 8fe8f56 commit a2dd58c

File tree

748 files changed

+23423
-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.

748 files changed

+23423
-13874
lines changed

Cargo.lock

Lines changed: 91 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 13 additions & 12 deletions
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)