Skip to content

Commit 98bc9a8

Browse files
author
gitbot
committed
Squashed 'library/' changes from 78fc550..18f755d
18f755d Update `compiler-builtins` to 0.1.146 002c539 Merge commit '3383cfbd3572465febc7a8f816a46304373de46a' into sync-from-portable-simd-2025-01-18 64dc9e8 ignore win_delete_self test in Miri 8a7dd23 Fix pattern matching mode changes and unsafe_op_in_unsafe_fn 9b98328 Mark extern blocks as unsafe 15a94a2 Rename field in OnceWith from gen to make ec45f6e Mark link_section attr with unsafe 3e1b92d Use Option for FindNextFileHandle 8b0e28a fix(libtest): Enable Instant on Emscripten targets 573c9ce Simplify Rc::as_ptr docs + typo fix b8a5ec3 Stabilize `vec_pop_if` 6888476 Rustfmt 61209a4 occured -> occurred 6e9d7bd Allow Rust to use a number of libc filesystem calls eba4b83 Windows: Test that deleting a running binary fails 90c6a6e Update platform information for remove_file 42e812c Windows: remove readonly files 5fcf888 Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]` 8f9d192 Document `Sum::sum` returns additive identities for `[]` 091dcc1 Clean up 'HashMap' and 'HashSet' docs; 2f5d494 Optimize `Rc::<str>::default()` implementation 0bc885c std: get rid of `sys_common::io` c9b4ef9 std: move `io` module out of `pal` 9698841 Move two windows process tests to tests/ui c6b8911 tests(std/net): remove outdated `base_port` calculation 5b35876 sys: net: Add UEFI stubs dc64946 Remove some unnecessary parens in `assert!` conditions 694b6ff remove use of `feature(trait_upcasting)` from core tests ae81fe4 Stabilise 'Cursor::{get_mut, set_position}' in 'const' scenarios; 359d24a Stabilize `HashMap::get_many_mut` as `HashMap::get_disjoint_mut` 110b529 tests(std): don't output to std{out,err} in `test_creation_flags` and `test_proc_thread_attributes` b62aa8e Fix unreachable_pub lint for hermit target 381d66f Fix link in from_fn.rs 71e4e87 Use `widening_mul` c0bc6d1 Add OneSidedRangeBound to eliminate panic in `split_point_of` 1a69ccf Rename slice::take methods to split_off da6c394 Update `compiler-builtins` to 0.1.145 2a60709 specify a prim@slice in docs 06c93ae implement inherent str constructors f479728 std: move network code into `sys` ba7d7f1 uefi: process: Add support for command environment variables bf9e15d Mark `std::fmt::from_fn` as `#[must_use]` 6262838 Rename rustc_contract to contract ad0f639 Improve contracts intrisics and remove wrapper function e0c6bd7 Separate contract feature gates for the internal machinery 0e35731 Desugars contract into the internal AST extensions 3500b93 Express contracts as part of function header and lower it to the contract lang items f261ebb contracts: added lang items that act as hooks for rustc-injected code to invoke. 5e8868c Contracts core intrinsics. df83991 More PR feedback aa0a348 PR feedback 703d260 Add `unchecked_disjoint_bitor` with fallback intrinsic implementation 0159ea4 Add note about `FnPtr` being exposed as public bound 9363de2 Add `cast_signed` and `cast_unsigned` methods for `NonZero` types 2b48e85 For NonZero impl macros, give unsigned impls access to the corresponding signed type 6f91646 std::fs: further simplify dirent64 handling 77b4328 add UnsafeCell direct access APIs 203d28a primitive type migration from mod.rs to primitives.rs 5537248 implement unstable `new_range` feature b29c956 std::range e4df802 Remove stabilized feature gate 1016171 Move env modifying tests to a separate integration test 4046027 Fix for SGX bfe1f15 Fix benchmarking of libstd a8ba245 Move std::sync unit tests to integration tests 7fbcab1 Move std::thread_local unit tests to integration tests 8ab934c Move std::time unit tests to integration tests 7b07e8a Move std::path unit tests to integration tests fb7c980 Move std::panic unit tests to integration tests c804e46 Move std::num unit tests to integration tests d49b739 Move std float unit tests to integration tests 0b71dc6 Move std::error unit tests to integration tests 64328e5 Move std::env unit tests to integration tests 864a986 no unsafe pointer and no overflowing_literals in fmt::Display of integers 30dd680 black_box integer-input on fmt benches e82c2ef OnceCell & OnceLock docs: Using (un)initialized consistently 7e59da9 Docs for f16 and f128: correct a typo and add details eddefa3 rustc_allowed_through_unstable_modules: require deprecation message 2b4b306 Update encode_utf16 to mention it is native endian f1f90bd remove Rustc{En,De}codable from library and compiler 2e4c38a make rustc_encodable_decodable feature properly unstable 84f5d1a Fix sentence in process::abort 79b885e document ptr comparison being by address 51cfa0f stabilize `once_wait` 6a9c523 implement all min/max fns in terms of `<`/`is_lt` c892406 improve doc tests for (min/max/minmax).* functions 2d9fcde docs: Documented Send and Sync requirements for Mutex + MutexGuard 0e3fac7 Add documentation for derive(CoercePointee) 2406ea3 Fix off-by-one error causing driftsort to crash 1157a88 Insert null checks for pointer dereferences when debug assertions are enabled 73ede2b atomic: extend compare_and_swap migration docs 41b7c66 float::min/max: mention the non-determinism around signed 0 5b6c11c Stabilize `const_black_box` 8c5182d Improve documentation for file locking 92be981 Remove minor future footgun in `impl Debug for MaybeUninit` 26a2286 Add `AsyncFn*` to core prelude c74312e uefi: Implement path b515410 Implement `int_from_ascii` (rust-lang#134821) a6703aa Cleanup docs for Allocator ef66278 btree/node.rs: pop_internal_level: does not invalidate other handles 720fee6 btree/node.rs: remove incorrect comment from pop_internal_level docs 91ca2a0 add inline attribute and codegen test 598045c split slice::ptr_rotate into three separate algorithms, to hopefully help inlining e04ea12 optimize slice::ptr_rotate for compile-time-constant small rotates d4d906f Test pipes also when not running on Windows and Linux simultaneously 921b788 uefi: process: Fix args 8994300 [cfg_match] Document the use of expressions 49de93c Update comments and sort target_arch in c_char_definition 3594c4c [Clippy] Add vec_reserve & vecdeque_reserve diagnostic items 79f39aa Fix platform-specific doc string for AtomicUsize::from_mut to be platform-independent fddcef1 Document powf and powi calls that always return 1.0 106ee95 Document purpose of closure in from_fn.rs more clearly 40692f8 add missing allocator safety in alloc crate 4db8de1 alloc: add `#![warn(unreachable_pub)]` 3af93dd Implement `AtomicT::update` & `AtomicT::try_update` 55f153e fix doc for std::sync::mpmc 353bb2b Implement phantom variance markers 6d48262 Clarify WindowsMut (Lending)Iterator 36a0fa0 compiler_fence: fix example b48990b Update `std::io::{pipe, PipeReader, PipeWriter}` docs the new location 5dcc3e8 Move `std::io::pipe` code into its own file f204918 Actually run the bstr test 3a7e03f Update comment a6f7a27 Put all coretests in a separate crate 9e66d8b Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls 10d40ff add nto80 x86-64 and aarch64 target 1bbd957 Add support for QNX 7.1 with io-sock on x64 8c8faa5 Add new target for supporting Neutrino QNX 6.1 with `io-socket` network stack on aarch64 fd95b51 Update a bunch of comments from before wasi support was added 8377625 Remove a bunch of emscripten test ignores 3bb41fe Fix testing of the standard library with Emscripten e525a7b fix(libtest): Deprecate '--logfile' f6eca15 docs: fix typo in std::pin overview ae89f78 ports last few library files to new intrinsic style a3c38e1 Improve and expand documentation of pipes 413860c Fix set_name in thread mod for NuttX cb49034 Fix `FormattingOptions` instantiation with `Default` 98bd32e Update library/core/src/num/nonzero.rs d7e6efe Add memory layout documentation to generic NonZero<T> da1d60a Fix whitespace 3baedcb document order of items in iterator from drain 38c8b40 Add `File already exists` error doc to `hard_link` function 85fb645 Doc difference between extend and extend_from_slice 597528a Make `Vec::pop_if` a bit more presentable 5d7954e Implement `VecDeque::pop_front_if` & `VecDeque::pop_back_if` 4c7286b remove pointless allowed_through_unstable_modules on TryFromSliceError 0d783f8 test: add `#![warn(unreachable_pub)]` e8a8c0a proc_macro: add `#![warn(unreachable_pub)]` 4fa58a8 Implement `CloneToUninit` for `ByteStr` 262799d Add doc aliases for BStr and BString 18981ff Omit some more `From` impls to avoid inference failures a2a3e07 Support `no_rc`, `no_sync`, and `no_global_oom_handling` eeb8228 Add `#[cfg(not(test))]` to some impls to work around rust-lang#135100 b80424b Implement `ByteStr` and `ByteString` types 7b5769b Remove erroneous `unsafe` in `BTreeSet::upper_bound_mut` aa0819f Library: Finalize dyn compatibility renaming 0f8e1f6 Remove test panic from File::open e1051b6 fix OsString::from_encoded_bytes_unchecked description 8fe52da Add an example of using `carrying_mul_add` to write wider multiplication 5043c02 Outline panicking code for `LocalKey::with` 580db28 core: `#[allow(unreachable_pub)]` on unreachable `pub use` 700d1de core: add `#![warn(unreachable_pub)]` 3be50e3 rtstartup: add `#![warn(unreachable_pub)]` e403c1c panic_unwind: add `#![warn(unreachable_pub)]` efe703a Recognise new IPv6 documentation range from RFC9637 96235ea 1. Removed 'rustc_nounwind' 2. Rewording of comments 7dfd3fa Export likely(), unlikely() and cold_path() in std::hint 1d028e1 Correct counting to four in cell module docs a2db888 doc: Point to methods on `Command` as alternatives to `set/remove_var` 64e1593 wasi/io: remove dead files a56cbae remove unnecessary rustc_allowed_through_unstable_modules b7b464e further improve panic_immediate_abort by removing rtprintpanic messages 1ca961f cargo update 1443175 Rewrap following accepting review suggestions from @ibraheemdev c9f38ea Update library/core/src/slice/mod.rs fe1379a Update library/core/src/slice/mod.rs bd07bff Update library/core/src/slice/mod.rs 36accf6 Update library/core/src/slice/mod.rs 747491d Update library/core/src/slice/mod.rs d3f4acd Update library/core/src/slice/mod.rs f1a60c5 Update library/core/src/slice/mod.rs 4b98f0b Update library/core/src/slice/mod.rs 3f2d1e6 Update library/core/src/slice/mod.rs 4b29262 Update library/core/src/slice/mod.rs a2e2219 `then be` -> `be` based on feedback from @ibraheemdev f21ab09 Improve `select_nth_unstable` documentation clarity a2cb483 Revert "Auto merge of rust-lang#134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 30cb3d2 Add references to the IEEE functions for `float_next_up_down` f1ffbc5 Stabilize `float_next_up_down` e81951a Fix import of pipe in kernel_copy.rs d39d9f2 Move `std::pipe::*` into `std::io` 388ead3 Clarify note in `std::sync::LazyLock` example cd44abd fix typo in library/alloc/src/sync.rs 2d278fe Add missing safety descriptions to Arc's 'from_raw','increment_strong_count','decrement_strong_count' 0781815 Adjust syntax a30c2fa Less unsafe in `dangling`/`without_provenance` 2900045 fix typo in typenames of pin documentation cb7aef6 intrinsics: deprecate calling them via the unstable std::intrinsics path 2113067 add comments explaining main thread identification b94ae92 std: lazily allocate the main thread handle 651379e Revert "Remove the Arc rt::init allocation for thread info" 867451a Update ReadDir::next in std::sys::pal::unix::fs to use `&raw const (*ptr).field` instead of `ptr.offset(...).cast()`. 41b981a Update compiler-builtins to 0.1.143 62d967a Rename `pos` to `position` 7880e7b Convert `struct FromBytesWithNulError` into enum bba3a61 Enforce syntactical stability of const traits in HIR 3a6d320 Update compiler-builtins to 0.1.141 da31b07 Add another `Vec::splice` example 4bba2ad avoid nesting the user-defined main so deeply on the stack c13a898 use a single large catch_unwind in lang_start ad71d50 uefi: helpers: Introduce OwnedDevicePath 8908e00 path: Move is_absolute check to sys::path 08749e2 Update the explanation for why we use box_new in vec! 9d5b17f Add #[inline] to copy_from_slice e699e39 Add inherent versions of MaybeUninit methods for slices 72c336a Make UniqueRc invariant for soundness 00d93dd update and clarify StructuralPartialEq docs ef24dff Use `NonNull::without_provenance` within the standard library f31ded7 Initial fs module for uefi 173d300 Improve the safety documentation on new_unchecked ca7ae0f Update a bunch of library types for MCP807 d5b90ae alloc: remove unsound `IsZero` for raw pointers ec72288 Fix `proc_macro::quote!` for raw ident dbf5787 Append `TokenTree` with `ToTokens` in `proc_macro::quote!` 67946b1 Rename the internal simpler `quote` macro to `minimal_quote` 9968cea Used pthread name functions returning result for FreeBSD and DragonFly c6a5806 Fix ptr::from_ref documentation example comment 9efc14b Improve prose around `as_slice` example of IterMut e1481dd fmt b445eff update cfg(bootstrap) 2409ba3 update version placeholders e8445a2 Remove some unnecessary `.into()` calls 8483774 add missing provenance APIs on NonNull bf748fd More compelling env_clear() examples 593d344 Implement Condvar::wait_timeout for targets without threads 6eb1845 Impl String::into_chars 162f39d Avoid naming variables `str` 65b884e [generic_assert] Constify methods used by the formatting system 921190a Add support for wasm exception handling to Emscripten target 5609743 chore: remove redundant words in comment df47fe2 Add doc aliases for `libm` and IEEE names aff0cfe Mark `slice::reverse` unstably const 1705049 Clarified the documentation on core::iter::from_fn and core::iter::successors 5e24932 library: fix adler{-> 2}.debug 0bce152 add regression test for unsound Flatten/FlatMap specialization 85566d9 do not in-place-iterate over flatmap/flatten 780fc85 Fix UWP build e46d5a4 Bump backtrace to 0.3.75 ec45e92 sync to actual dep verions of backtrace 5cc5468 turn rustc_box into an intrinsic 5627944 core: use public method instead of instrinsic f8244f1 core: improve comments 6c50809 core: implement `bool::select_unpredictable` 8588199 Switch rtems target to panic unwind 2411b92 path in detail 785d258 Move some things to `std::sync::poison` and reexport them in `std::sync` 1e9b5fe Bump backtrace to rust-lang/backtrace-rs@4d7906b aa7cfe1 Try to write the panic message with a single `write_all` call cc56d87 fix doc for missing Box allocator consistency 550784c Remove qualification of `std::cmp::Ordering` in `Ord` doc 52cfdcf std::fs::DirEntry.metadata(): prefer use of lstat() on Emscripten 1ecc2e5 Avoid use of LFS64 symbols on Emscripten 641065e char to_digit: avoid unnecessary casts to u64 afc064c Remove allowing static_mut_refs lint 86d1ec2 Tidy up bigint mul methods 6fff996 fix doc for read write unaligned in zst operation 1bfee1a Avoid short writes in LineWriter 0bf68d2 ptr docs: make it clear that we are talking only about memory accesses dafc1e2 Make slice::as_flattened_mut unstably const c712785 rename typed_swap → typed_swap_nonoverlapping f55e520 stabilize const_swap 8ffc670 fix: typos 97e4379 Fix sentence fragment in `pin` module docs 3d6308e docs: inline `alloc::ffi::c_str` types to `alloc::ffi` 3289ded Fix compilation issues on other unixes 9d8c803 Eliminate redundant statx syscalls d676dd0 Unify fs::copy and io::copy acdcf3a Update `compiler-builtins` to 0.1.140 a796fc4 Update library/alloc/tests/sort/tests.rs 585e1bb Fix typos b853975 Override `carrying_mul_add` in cg_llvm 49fff1b Move `{widening, carrying}_mul` to an intrinsic with fallback MIR b5dc2f8 Fix mistake in windows file open b5167eb Windows: Use WriteFile to write to a UTF-8 console 9f31faf ptr::copy: fix docs for the overlapping case cb9bf57 Fix renaming symlinks on Windows fc64963 docs: inline `core::ffi::c_str` types to `core::ffi` e3dfd8b docs: inline `std::ffi::c_str` types to `std::ffi` 8736a22 unwinding: bump version to fix asm 76d7b08 docs: update code example for Iterator#rposition f117d84 Use scoped threads in `std::sync::Barrier` examples 4b6efe2 Fix forgetting to save statx availability on success a081dca Specify only that duplicates are discarded, not the order. b092081 Document collection `From` and `FromIterator` impls that drop duplicate keys. c73c3d3 Add 'into_array' conversion destructors for 'Box', 'Rc', and 'Arc'; 37816c5 Impl FromIterator for tuples with arity 1-12 1e32d07 Fix formatting a6437ed stabilize const_alloc_layout c344533 chore: fix typos 6e99d71 Windows: Use FILE_ALLOCATION_INFO for truncation 6a41638 Bump `stdarch` b9f2cf7 core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets in the type f48cc3d Fixes safety docs for `dyn Any + Send {+ Sync}` d5deab2 Use `#[derive(Default)]` instead of manually implementing it daebe18 Revert "Auto merge of rust-lang#130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser" d619c11 Implement `PointerLike` for `isize`, `NonNull`, `Cell`, `UnsafeCell`, and `SyncUnsafeCell`. 70ec1be docs: `transmute<&mut T, &mut MaybeUninit<T>>` is unsound when exposed to safe code 86bb401 docs: Permissions.readonly() also ignores root user special permissions 508a6b6 cargo update 42e801c Delete `Rvalue::Len` e75abe1 Asserts the maximum value that can be returned from `Vec::len` 4728193 Document `PointerLike` implementation restrictions. 20ec90d Use `&raw` for `ptr` primitive docs 5b3c4b9 Add `is_ascii` function optimized for x86-64 for [u8] b9fdbcd Add new implementation benchmark 62f19c5 Document CTFE behavior of methods that call is_null d1ee786 Correctly document is_null CTFE behavior. 2a4ea4f Win: rename: Use offset_of! in struct size calculation da4c8c0 Win: Remove special casing of the win7 target for `std::fs::rename` 89d2548 Win: Add test cases for renaming a directory while the target file is opened and for renaming over a non-empty directory 579cf82 Win: Use `FILE_RENAME_FLAG_POSIX_SEMANTICS` for `std::fs::rename` if available 41f32e9 Less unwrap() in documentation acc3560 Improve prose around into_slice example of IterMut a4e0c77 Improve prose around `as_slice` example of Iter 523623e Improve prose around basic examples of Iter and IterMut 5a69c5d Abstract `ProcThreadAttributeList` into its own struct f925249 fix `PointerLike` docs 997f5bf unimplement `PointerLike` for trait objects 37b33e2 split up `#[rustc_deny_explicit_impl]` attribute 1b22783 remove reference to dangling from slice::Iter d6f58a6 mri: add track_caller to thread spawning methods for better backtraces 0bac398 fix typos in the example code in the doc comments of `Ipv4Addr::from_bits()`, `Ipv6Addr::from_bits()` & `Ipv6Addr::to_bits()` f451b5f Improve documentation of `element_offset` and related methods 9d3bbe7 Rename `elem_offset` to `element_offset` 51b6957 docs: Mention `spare_capacity_mut()` in `Vec::set_len` 7533a23 build: Update libc version ec0ee63 fix typo in ptr/mod.rs afe027b Stabilize `#[diagnostic::do_not_recommend]` 4f89e9b Use field init shorthand where possible 7aa4315 fix(LazyCell): documentation of get[_mut] was wrong 9489d18 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 05656eb Fix typo in uint_macros.rs 9cf367c remove obsolete comment and pub(super) visibility 4e3ac33 remove bounds from vec and linkedlist ExtractIf eaed453 Add a range argument to vec.extract_if 2655ee8 Stabilize #[coverage] attribute 46107d2 Remove `rustc::existing_doc_keyword` lint. c688c05 Move `doc(keyword = "while")`. bb5054d rustdoc-search: let From and Into be unboxed 530f2cb Replace i32 by char in `split_at` & `_unchecked` 4bddbab Add clarity to the "greater" of `VecDeque::insert` 3ee8419 Replace i32 by char to add clarity 15c540d Add value accessor methods to `Mutex` and `RwLock` 5074a9d std::net: Solaris supports `SOCK_CLOEXEC` as well since 11.4. 4bb067a UniqueRc: platform-specific AsFd/Handle/etc impls to mirror Rc 182d673 UniqueRc: PinCoerceUnsized and DerefPure 780bc6c UniqueRc: comparisons and Hash c9754d1 UniqueRc: Add more trait impls. 6c90a9c Remove support for specializing ToString outside the standard library 60acb56 Correct spelling of CURRENT_RUSTC_VERSION aa156a3 Add documentation for anonymous pipe module 2a36f18 feat: clarify how to use `black_box()` a8519bd Update includes in '/library/core/src/error.rs'; d0af5ce Fix building `std` for Hermit after `c_char` change f731d69 Fix `Path::is_absolute` on Hermit eabf279 Fix typos in docs on provenance c570d3d Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators 1993a4d Switch inline(always) in core/src/fmt/rt.rs to plain inline 3864b82 Reword prelude for AsyncFn stabilization 897366e Stabilize async closures 9522ad4 Remove consteval note from <*mut T>::align_offset docs. f7e4155 Stabilize the Rust 2024 prelude f51787d Forbid unsafe_op_in_unsafe_fn in hurd-specific os and sys files d960280 Move some alloc tests to the alloctests crate 8166b50 control libunwind linkage mode via `crt-static` on gnullvm targets ecb36c5 Change `GetManyMutError` to match T-libs-api decision fe9c4b2 Add references to the specific ABI documents c08c425 Remove l4re from the unsigned char operating system list 5fc95ec De-duplicate and improve definition of core::ffi::c_char 73fb11d Add a note saying that `{u8,i8}::from_{be,le,ne}_bytes` is meaningless d07489b stabilize const_nonnull_new 530c524 Remove rustc_const_stable attribute on const NOOP 7dffc78 Add libc funcitons only for wasm32-wasip1-threads. dda160d Fix compilation for wasm32-wasip1 (without threads). 1573375 Use UNIX thread_local implementation for WASI. 37f92e8 Run TLS destructors for wasm32-wasip1-threads 223637d Downgrade cc 3c32a2b Run `cargo update` and update licenses 008f3d3 chore: Improve doc comments fbdba35 Refactor ReadDir into a state machine b99d497 wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next d08695a docs: better examples for `std::ops::ControlFlow` 003793c Expand home_dir docs 0fd47a5 Add doc alias 'then_with' for `then` method on `bool` 69c0d25 Adds new intrinsic declaration c7c0bbc Define acronym for thread local storage 878a459 Add a `collect_into` tuple test case e36b6b9 Don't impl Extend for 13-tuples 76cdc53 Simplify documentation for Extend impl for tuples 3a3252e Add Extend impls for tuples of arity 1 through 12 c83cb5a Unbreak tidy 3ee629d Stabilize `std::io::ErrorKind::QuotaExceeded` 0a791c1 Stabilize `std::io::ErrorKind::CrossesDevices` a7106c2 Access members of `FormattingOptions` directly instead of via getters/setters 5315721 Removed constness for methods receiving a `&mut` parameter ebc4916 Added better reason for exposing `flags` and `get_flags` as unstable a7e9b3f Formatted 9673e8c Refactored FormattingOptions to use a bitmask for storing flags 2966da4 Revert "Turned public+unstable+hidden functions into private functions" 1b99d48 Turned public+unstable+hidden functions into private functions 169386f Made all fns const 4599a61 impl Default for fmt::FormattingOptions 0f39463 Fixed copy+paste error in comment 84352d0 fmt::FormattingOptions: Renamed `alignment` to `align` 64c8e66 Formatter::with_options: Use different lifetimes 99cb469 Fixed another broken test e06a29c Added struct `fmt::FormattingOptions` d7d2438 Formatter: Access members via getter methods wherever possible d4f4923 Stabilize noop_waker 2ff21e9 Improve documentation de297a1 Reformat Python code with `ruff` 9687825 Improve comments for the default backtrace printer d39be9c clarify simd_relaxed_fma non-determinism 9a9e399 Teach rust core about Xtensa VaListImpl and add a custom lowering of vaarg for xtensa. 3025c38 Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro` de408dc Allow fn pointers comparisons lint in library 82ef219 Update `NonZero` and `NonNull` to not field-project (per MCP807) 5af62ab Add `core::arch::breakpoint` and test 11a5c19 a release operation synchronizes with an acquire operation 8662f6f Update the definition of `borrowing_sub` d33342d stabilize const_{size,align}_of_val 812ba58 ./x miri: fix sysroot build 9d32ea8 stabilize const_collections_with_hasher and build_hasher_default_const_new 7cced33 Match simd_relaxed_fma documentation to fmuladd intrinsic 1ebdefa Add simd_relaxed_fma intrinsic ead54c4 Fix `f16::midpoint` const feature gate 5c0ca1e Use c"lit" for CStrings without unwrap 329942c Stabilize `const_maybe_uninit_write` 4088396 Fix docs for '<[T]>::as_array'; f7def21 Stabilize `ptr::fn_addr_eq` 0dd80ee rustc_allow_const_fn_unstable is not used in proc_macro 64c5214 get rid of a bunch of unnecessary rustc_const_unstable 8d7c692 remove a whole bunch of unnecessary const feature gates 8050614 add isatty alias for is_terminal 922ffda Stabilize unsigned `num_midpoint` feature 075775b Mark `slice::copy_from_slice` unstably const 1335302 Fix chaining `carrying_add`s 9c52a52 add test for bytewise ptr::swap of a pointer e80a5ed move swap_nonoverlapping constness to separate feature gate 5fce1d4 move slice::swap_unchecked constness to slice_swap_unchecked feature gate fefde77 Add diagnostic item for `std::ops::ControlFlow` 388c9e8 update link to "C++ Exceptions under the hood" blog 3a4cf4d fix: fix codeblocks in `PathBuf` example cc29869 fix: hurd build, stat64.st_fsid was renamed to st_dev 4487be9 std: clarify comments about initialization c818c21 std: refactor `pthread`-based synchronization cf3605a bump hashbrown version e1ba0c1 Fill in a `BTreeSet::entry` example ba4455f Add a tracking issue for `btree_set_entry` b985f98 Add `BTreeSet` entry APIs to match `HashSet` 179744d Implement code review 7a84818 thread::available_parallelism for wasm32-wasip1-threads cc132b3 changes old intrinsic declaration to new declaration 11d2df6 Fix and undeprecate home_dir() 8f88b59 refine mir debuginfo docs 2bf8452 Doc comment custom MIR debuginfo. 9a44c04 Stabilize `extended_varargs_abi_support` 79e7406 update cfgs 67e0b29 replace placeholder version c5894c4 Also use zero when referencing to capacity or length c15c50b Use consistent wording in docs, use zero instead of 0 83b8c20 Fix typos in pin.rs 7d5f25d Share inline(never) generics across crates b57f10d fmt 2eeb940 aix: create shim for lgammaf_r 8be922d Add '<[T]>::as_array', '<[T]>::as_mut_array', '<*const [T]>::as_array', and '<*mut [T]>::as_mut_array' conversion methods; 811a522 Remove one stray space. b04f42d Update chown help with a link and adding cap warning 5f4f11f Expand std::os::unix::fs::chown() doc with a warning e640ab2 Add missing code examples on `LocalKey` 2f2ea43 Make profiler_builtins `#![no_core]` instead of just `#![no_std]` 3a2f1d9 Remove unnecessary `#![allow(unused_features)]` 63b6bc4 Sort and separate lint/feature attributes in `profiler_builtins` 3b69764 std: update internal uses of `io::const_error!` d95461b std: expose `const_io_error!` as `const_error!` 5c1724b Constify Drop and Destruct 5b09129 miri: disable test_downgrade_observe test on macOS fb241da Shorten the `MaybeUninit` `Debug` implementation 8d58ef0 Support ranges in `<[T]>::get_many_mut()` 891dabe btree: add `{Entry,VacantEntry}::insert_entry` 742ddff std::thread: avoid leading whitespace in some panic messages 9442b07 Added a doc test for std::path::strip_prefix git-subtree-dir: library git-subtree-split: 18f755d
1 parent 8fe8f56 commit 98bc9a8

File tree

713 files changed

+18841
-9938
lines changed

Some content is hidden

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

713 files changed

+18841
-9938
lines changed

Cargo.lock

Lines changed: 26 additions & 35 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ 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]
1616
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

alloc/benches/btree/map.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

alloc/benches/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#![feature(iter_next_chunk)]
55
#![feature(repr_simd)]
66
#![feature(slice_partition_dedup)]
7-
#![cfg_attr(bootstrap, feature(strict_provenance))]
8-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
7+
#![feature(strict_provenance_lints)]
98
#![feature(test)]
109
#![deny(fuzzy_provenance_casts)]
1110

alloc/benches/slice.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,25 @@ rotate!(rotate_medium_half, gen_random, 9158, 9158 / 2);
366366
rotate!(rotate_medium_half_plus_one, gen_random, 9158, 9158 / 2 + 1);
367367

368368
// Intended to use more RAM than the machine has cache
369+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
369370
rotate!(rotate_huge_by1, gen_random, 5 * 1024 * 1024, 1);
371+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
370372
rotate!(rotate_huge_by9199_u64, gen_random, 5 * 1024 * 1024, 9199);
373+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
371374
rotate!(rotate_huge_by9199_bytes, gen_random_bytes, 5 * 1024 * 1024, 9199);
375+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
372376
rotate!(rotate_huge_by9199_strings, gen_strings, 5 * 1024 * 1024, 9199);
377+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
373378
rotate!(rotate_huge_by9199_big, gen_big_random, 5 * 1024 * 1024, 9199);
379+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
374380
rotate!(rotate_huge_by1234577_u64, gen_random, 5 * 1024 * 1024, 1234577);
381+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
375382
rotate!(rotate_huge_by1234577_bytes, gen_random_bytes, 5 * 1024 * 1024, 1234577);
383+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
376384
rotate!(rotate_huge_by1234577_strings, gen_strings, 5 * 1024 * 1024, 1234577);
385+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
377386
rotate!(rotate_huge_by1234577_big, gen_big_random, 5 * 1024 * 1024, 1234577);
387+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
378388
rotate!(rotate_huge_half, gen_random, 5 * 1024 * 1024, 5 * 1024 * 1024 / 2);
389+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
379390
rotate!(rotate_huge_half_plus_one, gen_random, 5 * 1024 * 1024, 5 * 1024 * 1024 / 2 + 1);

alloc/benches/vec.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,11 @@ fn bench_in_place_collect_droppable(b: &mut Bencher) {
547547
})
548548
}
549549

550+
// node.js gives out of memory error to use with length 1_100_000
551+
#[cfg(target_os = "emscripten")]
552+
const LEN: usize = 4096;
553+
554+
#[cfg(not(target_os = "emscripten"))]
550555
const LEN: usize = 16384;
551556

552557
#[bench]

alloc/src/alloc.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ use core::hint;
1010
#[cfg(not(test))]
1111
use core::ptr::{self, NonNull};
1212

13-
#[cfg(test)]
14-
mod tests;
15-
16-
extern "Rust" {
13+
unsafe extern "Rust" {
1714
// These are the magic symbols to call the global allocator. rustc generates
1815
// them to call `__rg_alloc` etc. if there is a `#[global_allocator]` attribute
1916
// (the code expanding that attribute macro generates those functions), or to call
@@ -342,7 +339,7 @@ unsafe impl Allocator for Global {
342339
}
343340
}
344341

345-
/// The allocator for unique pointers.
342+
/// The allocator for `Box`.
346343
#[cfg(all(not(no_global_oom_handling), not(test)))]
347344
#[lang = "exchange_malloc"]
348345
#[inline]
@@ -358,7 +355,7 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
358355
// # Allocation error handler
359356

360357
#[cfg(not(no_global_oom_handling))]
361-
extern "Rust" {
358+
unsafe extern "Rust" {
362359
// This is the magic symbol to call the global alloc error handler. rustc generates
363360
// it to call `__rg_oom` if there is a `#[alloc_error_handler]`, or to call the
364361
// default implementations below (`__rdl_oom`) otherwise.
@@ -429,7 +426,7 @@ pub mod __alloc_error_handler {
429426
// `#[alloc_error_handler]`.
430427
#[rustc_std_internal_symbol]
431428
pub unsafe fn __rdl_oom(size: usize, _align: usize) -> ! {
432-
extern "Rust" {
429+
unsafe extern "Rust" {
433430
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
434431
// Its value depends on the -Zoom={panic,abort} compiler option.
435432
static __rust_alloc_error_handler_should_panic: u8;

0 commit comments

Comments
 (0)