about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2025-09-12Improve `core::num` coverageChristian Poveda-0/+7
2025-09-12Improve `core::hash` coverageChristian Poveda-0/+13
2025-09-12Auto merge of #144847 - Randl:const-ord, r=oli-obkbors-107/+219
Constify Eq, Ord, PartialOrd Adds `#[const_trait]` and impls for `Eq`, `Ord`, `PartialOrd`. Impl for some other traits (e.g., slices and arrays) are blocked mainly on const closures (https://github.com/rust-lang/rust/issues/106003). For TypeId Ord we need const pointer comparison (https://github.com/rust-lang/rust/issues/53020) Tracking issue https://github.com/rust-lang/rust/issues/143800
2025-09-12Improve `core::fmt` coverageChristian Poveda-0/+52
2025-09-12Improve `core::char` coverageChristian Poveda-0/+44
2025-09-12Improve `core::alloc` coverageChristian Poveda-0/+24
2025-09-12Revert "Constify SystemTime methods"Ralf Jung-165/+68
This reverts commit 7ce620dd7c6fc3371290b40a1ea28146f0d37031. The const-hacks introduces bugs, and they make the code harder to maintain. Let's wait until we can constify these functions without changing their implementation.
2025-09-12examples: Make Clippy happyTsukasa OI-1/+0
2025-09-12stdarch-gen-arm: Make Clippy happyTsukasa OI-1/+1
2025-09-12intrinsic-test: Make Clippy happyTsukasa OI-2/+2
2025-09-12Auto merge of #146468 - Zalathar:rollup-6u3s44d, r=Zalatharbors-66/+124
Rollup of 15 pull requests Successful merges: - rust-lang/rust#144549 (match clang's `va_arg` assembly on arm targets) - rust-lang/rust#145895 (thread parking: fix docs and examples) - rust-lang/rust#146308 (support integer literals in `${concat()}`) - rust-lang/rust#146323 (check before test for hardware capabilites in bits 32~63 of usize) - rust-lang/rust#146332 (tidy: make behavior of extra-checks more uniform) - rust-lang/rust#146374 (Update `browser-ui-test` version to `0.22.2`) - rust-lang/rust#146413 (Improve suggestion in case a bare URL is surrounded by brackets) - rust-lang/rust#146426 (Bump miow to 0.60.1) - rust-lang/rust#146432 (Implement `Socket::take_error` for Hermit) - rust-lang/rust#146433 (rwlock tests: fix miri macos test regression) - rust-lang/rust#146435 (Change the default value of `gcc.download-ci-gcc` to `true`) - rust-lang/rust#146439 (fix cfg for poison test macro) - rust-lang/rust#146448 ([rustdoc] Correctly handle literal search on paths) - rust-lang/rust#146449 (Fix `libgccjit` symlink when we build GCC locally) - rust-lang/rust#146455 (test: remove an outdated normalization for rustc versions) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-12Rollup merge of #146439 - connortsui20:fix-sync-macro-attr, r=RalfJungStuart Cook-12/+15
fix cfg for poison test macro Fixes test regression in https://github.com/rust-lang/rust/pull/144648 Continuation of https://github.com/rust-lang/rust/pull/146433 I think this is right? Not really sure how to test this myself to be honest. r? ```@RalfJung``` I'll also leave the improvement to the test macro for a separate PR (described [here](https://github.com/rust-lang/rust/pull/146433#issuecomment-3280210451)) since I've never done something like that before. Though since this fixes all of the tests, it might not be necessary since anyone in the future will see the `cfg()` and not `cfg_attr()`?
2025-09-12Rollup merge of #146433 - RalfJung:rwlock-miri, r=tgross35Stuart Cook-3/+3
rwlock tests: fix miri macos test regression https://github.com/rust-lang/rust/pull/144648 broke the attributes that ignore the tests on Miri; this patch should fix that.
2025-09-12Rollup merge of #146432 - hermit-os:hermit-take_error, r=joboetStuart Cook-2/+3
Implement `Socket::take_error` for Hermit This PR fixes an unused-imports compilation error introduced in 845311a065a5638c516ed96c73b09862b176b329 and implements `Socket::take_error` for Hermit. Hermit's `Socket::take_error` implementation works exactly like the one for Unix. r? joboet
2025-09-12Rollup merge of #146323 - h3fang:issue-146230-fix, r=AmanieuStuart Cook-33/+44
check before test for hardware capabilites in bits 32~63 of usize This commit tries to fix https://github.com/rust-lang/rust/issues/146230. `std::arch::is_aarch64_feature_detected` panics on aarch64 ILP32 targets. After some digging, the real problem is https://github.com/rust-lang/rust/blob/91edc3ebccc4daa46c20a93f4709862376da1fdd/library/std_detect/src/detect/os/linux/aarch64.rs#L210-L241 checks bits 32~63 of usize unconditionally on normal aarch64 LP64 target and aarch64 ILP32 target. Here I propose to move these to a block guarded by `#[cfg(target_pointer_width="64")]`. See rust-lang/rust#146230 for more detailed analysis. r? ```@Amanieu```
2025-09-12Rollup merge of #145895 - RalfJung:unpark, r=joboetStuart Cook-16/+59
thread parking: fix docs and examples Fixes https://github.com/rust-lang/rust/issues/145816 r? ```@joboet``` Cc ```@m-ou-se``` ```@Amanieu```
2025-09-12Constify Eq, Ord, PartialOrdEvgenii Zheltonozhskii-107/+219
2025-09-12Auto merge of #146019 - joboet:better-dlsym, r=tgross35bors-51/+112
std: optimize `dlsym!` macro and add a test for it The `dlsym!` macro always ensures that the name string is nul-terminated, so there is no need to perform the check at runtime. Also, acquire loads are generally faster than a load and a barrier, so use them. This is only false in the case where the symbol is missing, but that shouldn't matter too much.
2025-09-12fix typo in commentFang He-1/+1
2025-09-11Auto merge of #145177 - joboet:move-pal-thread, r=ibraheemdevbors-1097/+897
std: move `thread` into `sys` Part of https://github.com/rust-lang/rust/issues/117276.
2025-09-11Merge pull request #1918 from a4lg/riscv-aes64im-lower-requirementsSayantan Chakraborty-1/+1
RISC-V: "Lower" requirements of `aes64im`
2025-09-12Remove big-endian swizzles from `vreinterpret`sayantn-9286/+6
2025-09-11update doc commentConnor Tsui-1/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-11fix config for poison macro testConnor Tsui-15/+18
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-09-11rwlock tests: fix miri macos test regressionRalf Jung-3/+3
2025-09-11Implement `Socket::take_error` for HermitMartin Kröning-1/+2
2025-09-11Remove unused import from sys/pal/hermit/os.rsMartin Kröning-1/+1
This fixes ``` error: unused import: `str` --> library/std/src/sys/pal/hermit/os.rs:6:22 | 6 | use crate::{fmt, io, str}; | ^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]` ``` This was caused by 845311a065a5638c516ed96c73b09862b176b329.
2025-09-11RISC-V: "Lower" requirements of `aes64im`Tsukasa OI-1/+1
This instruction is incorrectly categorized as the same one as `aes64ks1i` and `aes64ks2` (that should require `zkne || zknd` but currently require `zkne && zknd`) but `aes64im` only requires the Zknd extension. This commit fixes the category of this intrinsic (lowering the requirements from the Rust perspective but it does not actually lower it from the RISC-V perspective).
2025-09-11Rollup merge of #146425 - ferrocene:pvdrz/improve-array-coverage, ↵Stuart Cook-0/+7
r=workingjubilee Improve `core::array` coverage This PR improves the `core::array` coverage by adding new tests to `coretests`
2025-09-11Rollup merge of #146424 - ferrocene:pvdrz/improve-ops-coverage, r=workingjubileeStuart Cook-1/+75
Improve `core::ops` coverage This PR improves the `core::ops` coverage by adding new tests to `coretests`
2025-09-11Rollup merge of #146380 - rperier:unify_and_dedup_bits_conv_float_tests, ↵Stuart Cook-110/+63
r=tgross35 Unify and deduplicate bits conv float tests cc rust-lang/rust#141726 This is a proposal to unify and deduplicate the bits conv tests for f16, f32, f64 and f128
2025-09-11Rollup merge of #146379 - madsmtm:fix-platform_version-test, r=tgross35Stuart Cook-3/+3
Fix `compare_against_sw_vers` test The `saturating_sub` doesn't actually perform its intended since the version numbers are signed integers (which I changed in a later revision of https://github.com/rust-lang/rust/pull/138944). Fixes the issue described in https://github.com/rust-lang/rust/pull/138944#issuecomment-3270662876. r? tgross35
2025-09-11Rollup merge of #142315 - lolbinarycat:core-dedup-ptr-docs-139190-pt3, ↵Stuart Cook-134/+111
r=workingjubilee core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref also add INFO.md file explaining the purpose of the ptr/docs dir, and give some pointers (heh) to future maintainers. follow up to rust-lang/rust#142101 part of rust-lang/rust#139190 r? `@workingjubilee`
2025-09-10Improve `core::array` coverageChristian Poveda-0/+7
2025-09-10Update library/coretests/tests/ops.rsChristian Poveda Ruiz-1/+2
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2025-09-10Improve `core::ops` coverageChristian Poveda-1/+74
2025-09-10Rollup merge of #146322 - weiznich:fix/146087, r=joboetMatthias Krüger-0/+13
Make Barrier RefUnwindSafe again This commit manually implements `RefUnwindSafe` for `std::sync::Barrier` to fix rust-lang/rust#146087. This is a fix for a regression indroduced by https://github.com/rust-lang/rust/commit/e95db591a4550e28ad92660b753ad85b89271882
2025-09-10Rollup merge of #145327 - joboet:net-addr-sgx-hack, r=tgross35Matthias Krüger-216/+276
std: make address resolution weirdness local to SGX Currently, the implementations of `TcpStream::connect` and its cousins take an `io::Result<&SocketAddr>` as argument, which is very weird, as most of them then `?`-try the result immediately to access the actual address. This weirdness is however necessitated by a peculiarity of the SGX networking implementation: SGX doesn't support DNS resolution but rather accepts hostnames in the same place as socket addresses. So, to make e.g. ```rust TcpStream::connect("example.com:80")` ``` work, the DNS lookup returns a special error (`NonIpSockAddr`) instead, which contains the hostname being looked up. When `.to_socket_addrs()` fails, the `each_addr` function used to select an address will pass the error to the inner `TcpStream::connect` implementation, which in SGX's case will inspect the error and try recover the hostname from it. If that succeeds, it continues with the found hostname. This is pretty obviously a terrible hack and leads to buggy code (for instance, when users use the result of `.to_socket_addrs()` in their own `ToSocketAddrs` implementation to select from a list of possible URLs, the only URL used will be that of the last item tried). Still, without changes to the SGX usercall ABI, it cannot be avoided. Therefore, this PR aims to minimise the impact of that weirdness and remove it from all non-SGX platforms. The inner `TcpStream::connect`, et al. functions now receive the `ToSocketAddrs` type directly and call `each_addr` (which is moved to `sys::net::connection`) themselves. On SGX, the implementation uses a special `each_addr` which contains the whole pass-hostname-through-error hack. As well as making the code cleaner, this also opens up the possibility of reusing newly created sockets even if a connection request fails – but I've left that for another PR. CC `@raoulstrackx`
2025-09-10core::ptr: deduplicate docs for as_ref, addr, and as_uninit_refbinarycat-134/+111
also add INFO.md file explaining the purpouse of the ptr/docs dir.
2025-09-10loongarch: Align intrinsic signatures with LLVMWANG Rui-16/+20
2025-09-10std: only test `dlsym!` on platforms where it is actually usedjoboet-0/+10
`dlsym` doesn't work for finding libc symbols on platforms like linux-musl, so the test will fail.
2025-09-10std: move `thread` into `sys`joboet-1042/+842
2025-09-10Unify and deduplicate bits conv float testsRomain Perier-110/+63
2025-09-10Rollup merge of #144765 - Qelxiros:range-inclusive-last, r=jhprattMatthias Krüger-26/+169
inclusive `Range`s: change `end` to `last` Tracking issue: rust-lang/rust#125687 ACP: rust-lang/libs-team#511
2025-09-10Add suggestionsGeorg Semmler-3/+2
2025-09-09Fix compare_against_sw_vers test when a version part is 0Mads Marquart-3/+3
2025-09-09Rollup merge of #146366 - LorrensP-2158466:miri-gamma, r=RalfJungMatthias Krüger-5/+5
add approx_delta to all gamma tests f32::gamma tests are less precise in CI, so we increase the tolerance for these tests. See [#miri > Miri test-libstd Failure (2025-09) @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/Miri.20test-libstd.20Failure.20.282025-09.29/near/538138742) r? `@RalfJung`
2025-09-09Rollup merge of #146001 - bjorn3:update_getopts, r=davidtwcoMatthias Krüger-14/+3
Update getopts to remove unicode-width dependency Pulls in https://github.com/rust-lang/getopts/pull/133. This saves 1.5MB on the vendored size of the standard library.
2025-09-09Make the compile test use a const insteadGeorg Semmler-8/+7
2025-09-09Make Barrier RefUnwindSafe againGeorg Semmler-0/+15
This commit manually implements `RefUnwindSafe` for `std::sync::Barrier` to fix 146087. This is a fix for a regression indroduced by https://github.com/rust-lang/rust/commit/e95db591a4550e28ad92660b753ad85b89271882