Files
rust/library/coretests/tests/num
Jonathan Brouwer d095883e47 Rollup merge of #159554 - ajtribick:int_from_ascii_bytes, r=Mark-Simulacrum
feat: Update method signature of int_from_ascii

* Tracking issue: rust-lang/rust#134821

Following [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/327149-t-libs-api.2Fapi-changes/topic/How.20to.20proceed.20with.20int_from_ascii/with/611508226) it appears the preference is to change the API for this feature as follows:

```rust
// core::num

impl X {
    pub const fn from_ascii_bytes<T>(src: T) -> Result<X, ParseIntError>
    where
        T: [const] AsRef<[u8]> + [const] core::marker::Destruct;

    pub const fn from_ascii_bytes_radix<T>(src: T, radix: u32) -> Result<X, ParseIntError>
    where
        T: [const] AsRef<[u8]> + [const] core::marker::Destruct;
}
```

and similarly for `NonZero<X>`.

Reasons behind the change:

* Future-proof the naming convention for future string-like types
* Support the upcoming `ByteStr`/`ByteString` types: rust-lang/rust#134915

This pull request applies this change. The const-ness of these functions is now feature gated behind rust-lang/rust#143773
2026-07-27 11:58:05 +02:00
..
2026-02-14 21:23:30 +01:00
2026-06-08 00:43:12 +02:00
…
…
…
…
…
2026-05-11 22:42:47 +02:00
…
…
…
…
…
…
…