about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2025-07-08Update README with link to `josh-sync`Jakub Beránek-45/+2
2025-07-08Remove custom josh-sync scriptsJakub Beránek-768/+0
2025-07-08Add josh-sync config fileJakub Beránek-0/+3
2025-07-08Remove josh-sync crateJakub Beránek-455/+0
2025-07-08Rollup merge of #143608 - codexarafat:fix-string-doc, r=NoratriebMatthias Krüger-1/+1
Fix in std::String docs This PR removes the word “else” from the sentence ('something else similar') in the String documentation to improve clarity. Fixes rust-lang/rust#143579.
2025-07-08Rollup merge of #142098 - GuillaumeGomez:int_format_into, r=AmanieuMatthias Krüger-82/+325
Implement `int_format_into` feature I took over rust-lang/rust#138338 with `@madhav-madhusoodanan's` approval. Since https://github.com/rust-lang/rust/pull/136264, a lot of changes happened so I made use of them to reduce the number of changes. ACP approval: https://github.com/rust-lang/libs-team/issues/546#issuecomment-2707244569 ## Associated Issue - https://github.com/rust-lang/rust/issues/138215 r? `@hanna-kruppe`
2025-07-07Use `simd_funnel_sh{l,r}` and `simd_round_ties_even` to remove uses of LLVM ↵sayantn-163/+47
intrinsics
2025-07-07some clippy fixesMarijn Schouten-14/+12
2025-07-07std_detect: RISC-V Linux: Ergonomic querying with `riscv_hwprobe`Tsukasa OI-41/+42
Originally, we used an array of `riscv_hwprobe` directly and indexed using raw numbers, making correspondence between the index and the query key less obvious. We also frequently used `out[idx].key != -1` to test whether the key is supported by the `riscv_hwprobe` system call (on the Linux kernel version we are testing) but we'd better to integrate with an operation to retrieve the value. This commit improves the ergonomics of feature querying by: 1. Utilizing macros to a. enable indexing by identifier names and b. encapsulate accesses to the `riscv_hwprobe` array to query and 2. New method `riscv_hwprobe::get()` returning `Option<u64>`, integrating availability checking and value retrieval. It also removes `has_ima` for now because it's redundant if we only need to test for single base behavior.
2025-07-07Make `Default` const and add some `const Default` implsEsteban Küber-15/+34
Full list of `impl const Default` types: - () - bool - char - Cell - std::ascii::Char - usize - u8 - u16 - u32 - u64 - u128 - i8 - i16 - i32 - i64 - i128 - f16 - f32 - f64 - f128 - std::marker::PhantomData<T> - Option<T> - std::iter::Empty<T> - std::ptr::Alignment - &[T] - &mut [T] - &str - &mut str - String - Vec<T>
2025-07-08Mention more APIs in `ParseIntError` docsPavel Grigorenko-2/+5
2025-07-07Prepare for merging from rust-lang/rustJakub Beránek-0/+1
This updates the rust-version file to 1b61d43bdbf875183b1f436302d62ff93f9a6bba.
2025-07-07Add config files for `rustc-josh-sync`Jakub Beránek-0/+3
2025-07-07Update README.mdkilavvy-1/+1
- Update ui.md - Update type-alias-impl-trait.md - Update README.md
2025-07-07Remove std-detect dev dependency in core_archJakub Beránek-6/+2
2025-07-07Mark `avx` broadcast intrinsics as safeokaneco-7/+7
2025-07-07Use simd_extract! macro instead of calling simd_extract directlyltdk-6/+6
2025-07-07Update stabilization version of certain x86 intrinsics to 1.89Amanieu d'Antras-27/+27
These were left as `CURRENT_RUSTC_VERSION` in the submodule.
2025-07-07Add josh synchronization scriptsJakub Beránek-0/+817
2025-07-07Add empty rust-version fileJakub Beránek-0/+0
2025-07-07Remove support for dynamic allocasmejrs-1/+1
2025-07-08Fix in String docs: remove 'else' from 'something else similar'Md. Yeasin Arafat-1/+1
2025-07-07Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865Matthias Krüger-2/+2
awhile -> a while where appropriate
2025-07-07use `is_multiple_of` to check if an addr is alignedFolkert de Vries-4/+8
2025-07-07UWP: link ntdll functions using raw-dylibChris Denton-62/+30
2025-07-07Rollup merge of #143563 - xizheyin:fix-typo, r=joshtriplett许杰友 Jieyou Xu (Joe)-2/+2
std: fix typo in `std::path` I noticed that most of the document used `'` instead of `’`, so I adjusted it. r? `@ibraheemdev`
2025-07-07Rollup merge of #143130 - xizheyin:142966, r=ibraheemdev许杰友 Jieyou Xu (Joe)-0/+9
doc(std): clarify `NonZero<T>` usage limitation in doc comment Closes rust-lang/rust#142966 This PR clarifies `NonZero<T>` usage limitation in doc comment and fixes a typo. r? libs
2025-07-07std: fix typo in `std::path`xizheyin-2/+2
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07doc(std): clarify `NonZero<T>` usage limitation in doc commentxizheyin-0/+9
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-07Auto merge of #143556 - jhpratt:rollup-nid39y2, r=jhprattbors-51/+14
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143206 (Align attr fixes) - rust-lang/rust#143236 (Stabilize `mixed_integer_ops_unsigned_sub`) - rust-lang/rust#143344 (Port `#[path]` to the new attribute parsing infrastructure ) - rust-lang/rust#143359 (Link to 2024 edition page for `!` fallback changes) - rust-lang/rust#143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`) - rust-lang/rust#143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP) - rust-lang/rust#143535 (Remove duplicate word) - rust-lang/rust#143544 (compiler: rename BareFn to FnPtr) - rust-lang/rust#143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-07Rollup merge of #143552 - nagisa:makes-ceil-char-boundary-go-zoom, r=jhprattJacob Pratt-1/+1
lib: more eagerly return `self.len()` from `ceil_char_boundary` There is no reason to go through the complicated branch as it would always return `self.len()` in this case. Also helps debug code somewhat and I guess might make optimizations easier (although I haven't really a sample to demonstrate this.) ref. https://github.com/rust-lang/rust/issues/93743 Suggested by `@chrisduerr`
2025-07-07Rollup merge of #143529 - pixel27:master, r=jhprattJacob Pratt-37/+2
Renamed retain_mut to retain on LinkedList as mentioned in the ACP This is for proposal: https://github.com/rust-lang/libs-team/issues/250 The original check-in (https://github.com/rust-lang/rust/pull/114136) contained both methods **retain** and **retain_mut**, which does not conform to https://github.com/rust-lang/libs-team/issues/250#issuecomment-1766822671. I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request. The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements. I've run the tests "library/alloc" on the code and no issues. Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
2025-07-07Rollup merge of #143359 - clubby789:fallback-2024-doc, r=ibraheemdevJacob Pratt-5/+3
Link to 2024 edition page for `!` fallback changes Closes rust-lang/rust#143207
2025-07-07Rollup merge of #143236 - nxsaken:mixed_integer_ops_unsigned_sub, r=ibraheemdevJacob Pratt-8/+8
Stabilize `mixed_integer_ops_unsigned_sub` Closes rust-lang/rust#126043.
2025-07-07lib: more eagerly return `self.len()` from `ceil_char_boundary`Simonas Kazlauskas-1/+1
There is no reason to go through the complicated branch as it would always return `self.len()` in this case. Also helps debug code somewhat and I guess might make optimizations easier (although I haven't really a sample to demonstrate this.) ref. #93743 Suggested by @chrisduerr
2025-07-06Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJungbors-25/+219
Specialize sleep_until implementation for unix (except mac) related tracking issue: https://github.com/rust-lang/rust/issues/113752 Supersedes https://github.com/rust-lang/rust/pull/118480 for the reasons see: https://github.com/rust-lang/rust/issues/113752#issuecomment-2902594469 Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
2025-07-06Simplify num formatting helpersYotam Ofek-22/+3
2025-07-06sleep_until: add clock_nanosleep support to Miridvdsk-0/+1
The clock_nanosleep support is there to allow code using `sleep_until` to run under Miri. Therefore the implementation is minimal. - Only the clocks REALTIME and MONOTONIC are supported. The first is supported simply because it was trivial to add not because it was needed for sleep_until. - The only supported flag combinations are no flags or TIMER_ABSTIME only. If an unsupported flag combination or clock is passed in this throws unsupported.
2025-07-06sleep_until: use clock_nanosleep where possibledvdsk-25/+218
Using clock nanosleep leads to more accurate sleep times on platforms where it is supported. To enable using clock_nanosleep this makes `sleep_until` platform specific. That unfortunatly requires identical placeholder implementations for the other platforms (windows/mac/wasm etc). we will land platform specific implementations for those later. See the `sleep_until` tracking issue. This requires an accessors for the Instant type. As that accessor is only used on the platforms that have clock_nanosleep it is marked as allow_unused. 32bit time_t targets do not use clock_nanosleep atm, they instead rely on the same placeholder as the other platforms. We could make them use clock_nanosleep too in the future using `__clock_nanosleep_time64`. __clock_nanosleep_time64 is documented at: https://www.gnu.org/software/libc/manual/html_node/64_002dbit-time-symbol-handling.html
2025-07-06Renamed retain_mut to retain on LinkedList as mentioned in the ACPJoshua Gentry-37/+2
2025-07-06Rollup merge of #143477 - folkertdev:use-is-multiple-of, r=joshtriplettMatthias Krüger-13/+13
use `is_multiple_of` and `div_ceil` In tricky logic, these functions are much more informative than the manual implementations. They also catch subtle bugs: - the manual `is_multiple_of` often does not handle division by zero - manual `div_ceil` often does not consider overflow The transformation is free for `is_multiple_of` if the divisor is compile-time known to be non-zero. For `div_ceil` there is a small cost to considering overflow. Here is some assembly https://godbolt.org/z/5zP8KaE1d.
2025-07-06Rollup merge of #143470 - Ayush1325:uefi-tcp4-recv, r=joshtriplettMatthias Krüger-6/+52
std: sys: net: uefi: tcp4: Implement read - A blocking implementation of tcp4 read. - Basically a copy of [write](https://github.com/rust-lang/rust/pull/141532)
2025-07-05fix(lib-std-fs): handle `usize` overflow in `read` & `read_to_string`Ricardo Fernández Serrata-2/+2
2025-07-05Rollup merge of #143445 - folkertdev:va-list-intrinsics, r=RalfJungBen Kimock-17/+24
move `va_copy`, `va_arg` and `va_end` to `core::intrinsics` some questions: - should these functions be `pub`? - is a separate module justified? r? `@RalfJung`
2025-07-05use `div_ceil` instead of manual logicFolkert de Vries-6/+6
2025-07-05use `is_multiple_of` instead of manual moduloFolkert de Vries-7/+7
2025-07-05move the `va_copy`, `va_arg` and `va_end` to `core::intrinsics`Folkert de Vries-17/+24
2025-07-04Rollup merge of #143086 - SciMind2460:patch-2, r=workingjubileeJubilee-1/+1
Update poison.rs to fix the typo (sys->sync)
2025-07-04Rollup merge of #143040 - SciMind2460:patch-1, r=workingjubileeJubilee-1/+1
Add `const Rem`
2025-07-05std: sys: net: uefi: tcp4: Implement readAyush Singh-6/+52
A blocking implementation of tcp4 read. Signed-off-by: Ayush Singh <ayush@beagleboard.org>