about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2025-08-06Rollup merge of #144971 - okaneco:rename_isolate_ones, r=joshtriplettJakub Beránek-38/+38
num: Rename `isolate_most_least_significant_one` functions Tracking issue - https://github.com/rust-lang/rust/issues/136909 libs-api has agreed to rename these unstable functions to `isolate_highest_one`/`isolate_lowest_one` https://github.com/rust-lang/rust/issues/136909#issuecomment-3156005820 `isolate_most_significant_one` -> `isolate_highest_one` `isolate_least_significant_one` -> `isolate_lowest_one`
2025-08-06Rollup merge of #144926 - JonathanBrouwer:fix-mustuse, r=cuviperJakub Beránek-1/+1
Correct the use of `must_use` on btree::IterMut I'm working on stricter target checking for attributes and found this one
2025-08-06Rollup merge of #144836 - chotchki:patch-1, r=tgross35Jakub Beránek-1/+1
Change visibility of Args new function Currently the Args new function is constrained to pub(super) but this stops me from being able to construct Args structs in unit tests. This pull request is to change this to pub.
2025-08-06replace version placeholderBoxy-30/+30
2025-08-05Fix some doc links for intrinsicsEric Huss-4/+4
This fixes a few intrinsic docs that had a link directly to itself instead of to the correct function in the `mem` module.
2025-08-05`File::set_times`: Add documentation about setting directory timestampsJosh Triplett-0/+4
Inspired by https://github.com/rust-lang/rust/issues/123883 .
2025-08-05`File::set_times`: Remove `write(true)` from the example so it works on ↵Josh Triplett-1/+1
directories Inspired by https://github.com/rust-lang/rust/issues/123883 .
2025-08-05configure: Use `CARGO_CFG_*_{F16,F128}` rather than invoking rustcTrevor Gross-47/+10
Currently we run the `rustc` from the `RUSTC` environment variable to figure out whether or not to enable `f16` and `f128`, based on the `target_has_reliable_{f16,f128}` config. However, this does not know about the codegen backend used, and the backend isn't trivial to check in a build script (usually it gets set via `RUSTFLAGS`). It turns out we don't actually need to run `rustc` here: Cargo unconditionally emits all config from the relevant compiler as `CARGO_CFG_*` variables, regardless of whether or not they are known options. Switch to checking these for setting config rather than invoking `rustc`. As an added advantage, this will work with target.json files without any special handling. Fixes: ed17b95715dd ("Use the compiler to determine whether or not to enable `f16` and `f128`")
2025-08-05add code example showing that file_prefix treats dotfiles as the name of a ↵The 8472-0/+2
file, not an extension
2025-08-05Renamed `isolate_most_least_significant_one` functionsokaneco-38/+38
libs-api has agreed to rename these functions to `isolate_highest_one`/`isolate_lowest_one`
2025-08-05Add `std::ascii::Char` `MIN` and `MAX` constantsChai T. Rex-0/+8
2025-08-05Add `u8`-as-ASCII methods to `core::ascii::Char`Chai T. Rex-1/+603
2025-08-05Fix description of unsigned `checked_exact_div`Michael Tautschnig-12/+6
Like its signed counterpart, this function does not panic. Also, fix the examples to document how it returns Some/None.
2025-08-05Dynamically enable LSE for aarch64 rust provided intrinsicsPaul Murphy-0/+27
Create a private module to hold the bootstrap code needed enable LSE at startup on aarch64-*-linux-* targets when rust implements the intrinsics. This is a bit more heavyweight than compiler-rt's LSE initialization, but has the benefit of initializing the aarch64 cpu feature detection for other uses. Using the rust initialization code does use some atomic operations, that's OK. Mixing LSE and non-LSE operations should work while the update flag propagates.
2025-08-05compiler-builtins: plumb LSE support for aarch64 on linuxPaul Murphy-10/+66
Add dynamic support for aarch64 LSE atomic ops on linux targets when optimized-compiler-builtins is not enabled. A hook, __enable_rust_lse, is provided for the runtime to enable them if available. A future patch will use this to enable them if available. The resulting asm should exactly match that of LLVM's compiler-rt builtins, though the symbol naming for the support function and global does not.
2025-08-05Stabilize `core::iter::chain`Ross MacArthur-6/+3
2025-08-05Ignore sleep_until test on SGXRaoul Strackx-0/+1
2025-08-05use `IntoIterator` for the `add_flags` methodsFolkert de Vries-10/+11
2025-08-05Merge pull request #1895 from ↵Folkert de Vries-52/+50
madhav-madhusoodanan/intrinsic-test-intrinsictype-cleanup `intrinsic-test`: Cleaning the `IntrinsicType` struct and related functionalities
2025-08-05chore: moved chunk_info to `common` and code cleanupMadhav Madhusoodanan-35/+34
2025-08-05feat: cleaned the IntrinsicType struct and associated functions.Madhav Madhusoodanan-27/+26
Changes: 1. Removed `from_c` from the IntrinsicType definition. 2. Moved the `from_c` arm-specific definition to an ArmIntrinsicType-specific impl block
2025-08-05Rollup merge of #144872 - connortsui20:once-poison-docs, r=AmanieuSamuel Tardieu-5/+118
Document Poisoning in `LazyCell` and `LazyLock` Currently, there is no documentation of poisoning behavior in either `LazyCell` or `LazyLock`, even though both of them can be observed as poisoned by users. `LazyCell` [plagyround example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=9cf38b8dc56db100848f54085c2c697d) `LazyLock` [playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f1cd6f9fe16636e347ebb695a0ce30c0) # Open Questions - [x] Is it worth making the implementation of `LazyLock` more complicated to ensure that the the panic message is `"LazyLock instance has previously been poisoned"` instead of `"Once instance has previously been poisoned"`? See the `LazyLock` playground link above for more context. - [x] Does it make sense to move `LazyLock` into the `poison` module? It is certainly a poison-able type, but at the same time it is slightly different from the 4 other types currently in the `poison` module in that it is unrecoverable. I think this is more of a libs-api question. ``@rustbot`` label +T-libs-api Please let me know if these open questions deserve a separate issue / PR!
2025-08-05Rollup merge of #144867 - scottmcm:more-as-array, r=chenyukangSamuel Tardieu-16/+12
Use `as_array` in PartialEq for arrays Now that `as_array` exists we might as well use it here, since it's a bit more convenient than getting the correct type out of `try_into`.
2025-08-05Rollup merge of #144852 - Kivooeo:rename-panic, r=m-ou-seSamuel Tardieu-2/+2
Rename `rust_panic_without_hook` to `resume_unwind` part of https://github.com/rust-lang/rust/issues/116005 r? libs
2025-08-04Correct the use of `must_use` on btree::IterMutJonathan Brouwer-1/+1
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-04std: sys: io: io_slice: Add UEFI typesAyush Singh-0/+196
UEFI networking APIs do support vectored read/write. While the types for UDP4, UDP6, TCP4 and TCP6 are defined separately, they are essentially the same C struct. So we can map IoSlice and IoSliceMut to have the same binary representation. Since all UEFI networking types for read/write are DSTs, `IoSlice` and `IoSliceMut` will need to be copied to the end of the transmit/receive structures. So having the same binary representation just allows us to do a single memcpy instead of having to loop and set the DST. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-08-04Add new `test::print_merged_doctests_times` used by rustdoc to display more ↵Guillaume Gomez-11/+76
detailed time information and add new `OutputFormatter::write_merged_doctests_times` method to handle it
2025-08-04remove begin prefixKivooeo-1/+1
2025-08-04remove feature gateKivooeo-3/+2
2025-08-04Rollup merge of #144853 - Kivooeo:rust_-cleanup, r=Mark-SimulacrumStuart Cook-6/+6
Remove unnecessary `rust_` prefixes part of https://github.com/rust-lang/rust/issues/116005 Honestly, not sure if this can affect linking somehow, also I didn't touched things like `__rust_panic_cleanup` and `__rust_start_panic` which very likely will break something, so just small cleanup here also didn't changed `rust_panic_without_hook` because it was renamed here https://github.com/rust-lang/rust/pull/144852 r? libs
2025-08-04Rollup merge of #144667 - scottmcm:alignment-is-usize, r=tgross35Stuart Cook-3/+5
`AlignmentEnum` should just be `repr(usize)` now These used to use specific sizes because they were compiled on all widths. But now that the types themselves are `#[cfg]`'d, we can save some conversions by having it always be `repr(usize)`.
2025-08-04Rollup merge of #144188 - joshtriplett:available-parallelism, r=Mark-SimulacrumStuart Cook-0/+3
`available_parallelism`: Add documentation for why we don't look at `ulimit`
2025-08-04Rollup merge of #142205 - paolobarbolini:const_swap_with_slice-impl, ↵Stuart Cook-1/+2
r=Mark-Simulacrum Mark `slice::swap_with_slice` unstably const Tracking issue rust-lang/rust#142204
2025-08-04remove gateKivooeo-9/+2
2025-08-03add poisoning documentation to `LazyLock`Connor Tsui-2/+58
2025-08-03add poisoning documentation to `LazyCell`Connor Tsui-2/+59
2025-08-03fix broken doc section link in `poison.rs`Connor Tsui-1/+1
2025-08-04remove gatesKivooeo-4/+2
2025-08-03Rollup merge of #144843 - rust-lang:cargo_update, r=clubby789Samuel Tardieu-7/+6
Weekly `cargo update` Automation to keep dependencies in `Cargo.lock` current. r? dep-bumps The following is the output from `cargo update`: ```txt compiler & tools dependencies: Locking 14 packages to latest compatible versions Updating clap v4.5.41 -> v4.5.42 Updating clap_builder v4.5.41 -> v4.5.42 Updating jsonpath-rust v1.0.3 -> v1.0.4 Updating libredox v0.1.6 -> v0.1.9 Updating object v0.37.1 -> v0.37.2 Updating redox_syscall v0.5.16 -> v0.5.17 Updating redox_users v0.5.0 -> v0.5.2 Updating rustc-demangle v0.1.25 -> v0.1.26 Updating serde_json v1.0.141 -> v1.0.142 Updating wasm-encoder v0.235.0 -> v0.236.0 Updating wasmparser v0.235.0 -> v0.236.0 Updating wast v235.0.0 -> v236.0.0 Updating wat v1.235.0 -> v1.236.0 Updating windows-targets v0.53.2 -> v0.53.3 note: pass `--verbose` to see 36 unchanged dependencies behind latest library dependencies: Locking 3 packages to latest compatible versions Updating object v0.37.1 -> v0.37.2 Updating rustc-demangle v0.1.25 -> v0.1.26 Updating unwinding v0.2.7 -> v0.2.8 note: pass `--verbose` to see 2 unchanged dependencies behind latest rustbook dependencies: Locking 6 packages to latest compatible versions Updating cc v1.2.30 -> v1.2.31 Updating clap v4.5.41 -> v4.5.42 Updating clap_builder v4.5.41 -> v4.5.42 Updating redox_syscall v0.5.16 -> v0.5.17 Updating serde_json v1.0.141 -> v1.0.142 Updating windows-targets v0.53.2 -> v0.53.3 ```
2025-08-03Rollup merge of #144070 - stifskere:feat/macros/hash_map, r=NoratriebSamuel Tardieu-0/+76
Implement `hash_map` macro Implementation of https://github.com/rust-lang/rust/issues/144032 Implements the `hash_map` macro under `std/src/macros.rs`.
2025-08-03Use `as_array` in PartialEq for arraysScott McMurray-16/+12
2025-08-03remove rust_ prefixesKivooeo-6/+6
2025-08-03removed gateKivooeo-3/+1
2025-08-03rename rust_panic_without_hookKivooeo-2/+2
2025-08-03Merge pull request #1889 from rust-lang/rustc-pullFolkert de Vries-909/+1814
Rustc pull update
2025-08-03feat: Added another variant of the Constraint enumMadhav Madhusoodanan-6/+13
2025-08-03cargo updategithub-actions-7/+6
compiler & tools dependencies: Locking 14 packages to latest compatible versions Updating clap v4.5.41 -> v4.5.42 Updating clap_builder v4.5.41 -> v4.5.42 Updating jsonpath-rust v1.0.3 -> v1.0.4 Updating libredox v0.1.6 -> v0.1.9 Updating object v0.37.1 -> v0.37.2 Updating redox_syscall v0.5.16 -> v0.5.17 Updating redox_users v0.5.0 -> v0.5.2 Updating rustc-demangle v0.1.25 -> v0.1.26 Updating serde_json v1.0.141 -> v1.0.142 Updating wasm-encoder v0.235.0 -> v0.236.0 Updating wasmparser v0.235.0 -> v0.236.0 Updating wast v235.0.0 -> v236.0.0 Updating wat v1.235.0 -> v1.236.0 Updating windows-targets v0.53.2 -> v0.53.3 note: pass `--verbose` to see 36 unchanged dependencies behind latest library dependencies: Locking 3 packages to latest compatible versions Updating object v0.37.1 -> v0.37.2 Updating rustc-demangle v0.1.25 -> v0.1.26 Updating unwinding v0.2.7 -> v0.2.8 note: pass `--verbose` to see 2 unchanged dependencies behind latest rustbook dependencies: Locking 6 packages to latest compatible versions Updating cc v1.2.30 -> v1.2.31 Updating clap v4.5.41 -> v4.5.42 Updating clap_builder v4.5.41 -> v4.5.42 Updating redox_syscall v0.5.16 -> v0.5.17 Updating serde_json v1.0.141 -> v1.0.142 Updating windows-targets v0.53.2 -> v0.53.3
2025-08-02updated line number in testIsaac Chen-1/+1
2025-08-02moved new test to updated test locationIsaac Chen-39/+8
2025-08-02corrected lifetime in core::panic::Location::file return typeIsaac Chen-1/+1