From 0bbc2f2008d7af8069c477ec9757a46d2fd27330 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 3 Feb 2026 00:40:57 +0100 Subject: [PATCH 1/5] Remove USE_XCODE_CLANG Instead, always use the Xcode-provided Clang to build LLVM. --- src/ci/citool/tests/jobs.rs | 2 +- src/ci/citool/tests/test-jobs.yml | 1 - src/ci/github-actions/jobs.yml | 3 --- src/ci/scripts/install-clang.sh | 35 +++++++++++++------------------ 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/ci/citool/tests/jobs.rs b/src/ci/citool/tests/jobs.rs index b0309c52003f6..33fdb3f67b9be 100644 --- a/src/ci/citool/tests/jobs.rs +++ b/src/ci/citool/tests/jobs.rs @@ -6,7 +6,7 @@ const TEST_JOBS_YML_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/tes fn auto_jobs() { let stdout = get_matrix("push", "commit", "refs/heads/automation/bors/auto"); insta::assert_snapshot!(stdout, @r#" - jobs=[{"name":"aarch64-gnu","full_name":"auto - aarch64-gnu","os":"ubuntu-22.04-arm","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"free_disk":true},{"name":"x86_64-gnu-llvm-18-1","full_name":"auto - x86_64-gnu-llvm-18-1","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","DOCKER_SCRIPT":"stage_2_test_set1.sh","IMAGE":"x86_64-gnu-llvm-18","READ_ONLY_SRC":"0","RUST_BACKTRACE":1,"TOOLSTATE_PUBLISH":1},"free_disk":true},{"name":"aarch64-apple","full_name":"auto - aarch64-apple","os":"macos-14","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","DEVELOPER_DIR":"/Applications/Xcode_15.4.app/Contents/Developer","MACOSX_DEPLOYMENT_TARGET":11.0,"MACOSX_STD_DEPLOYMENT_TARGET":11.0,"NO_DEBUG_ASSERTIONS":1,"NO_LLVM_ASSERTIONS":1,"NO_OVERFLOW_CHECKS":1,"RUSTC_RETRY_LINKER_ON_SEGFAULT":1,"RUST_CONFIGURE_ARGS":"--enable-sanitizers --enable-profiler --set rust.jemalloc","SCRIPT":"./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin","TOOLSTATE_PUBLISH":1,"USE_XCODE_CLANG":1}},{"name":"dist-i686-msvc","full_name":"auto - dist-i686-msvc","os":"windows-2022","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","CODEGEN_BACKENDS":"llvm,cranelift","DEPLOY_BUCKET":"rust-lang-ci2","DIST_REQUIRE_ALL_TOOLS":1,"RUST_CONFIGURE_ARGS":"--build=i686-pc-windows-msvc --host=i686-pc-windows-msvc --target=i686-pc-windows-msvc,i586-pc-windows-msvc --enable-full-tools --enable-profiler","SCRIPT":"python x.py dist bootstrap --include-default-paths","TOOLSTATE_PUBLISH":1}},{"name":"pr-check-1","full_name":"auto - pr-check-1","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"continue_on_error":false,"free_disk":true},{"name":"pr-check-2","full_name":"auto - pr-check-2","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"continue_on_error":false,"free_disk":true},{"name":"tidy","full_name":"auto - tidy","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"continue_on_error":false,"free_disk":true,"doc_url":"https://foo.bar"}] + jobs=[{"name":"aarch64-gnu","full_name":"auto - aarch64-gnu","os":"ubuntu-22.04-arm","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"free_disk":true},{"name":"x86_64-gnu-llvm-18-1","full_name":"auto - x86_64-gnu-llvm-18-1","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","DOCKER_SCRIPT":"stage_2_test_set1.sh","IMAGE":"x86_64-gnu-llvm-18","READ_ONLY_SRC":"0","RUST_BACKTRACE":1,"TOOLSTATE_PUBLISH":1},"free_disk":true},{"name":"aarch64-apple","full_name":"auto - aarch64-apple","os":"macos-14","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","DEVELOPER_DIR":"/Applications/Xcode_15.4.app/Contents/Developer","MACOSX_DEPLOYMENT_TARGET":11.0,"MACOSX_STD_DEPLOYMENT_TARGET":11.0,"NO_DEBUG_ASSERTIONS":1,"NO_LLVM_ASSERTIONS":1,"NO_OVERFLOW_CHECKS":1,"RUSTC_RETRY_LINKER_ON_SEGFAULT":1,"RUST_CONFIGURE_ARGS":"--enable-sanitizers --enable-profiler --set rust.jemalloc","SCRIPT":"./x.py --stage 2 test --host=aarch64-apple-darwin --target=aarch64-apple-darwin","TOOLSTATE_PUBLISH":1}},{"name":"dist-i686-msvc","full_name":"auto - dist-i686-msvc","os":"windows-2022","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","CODEGEN_BACKENDS":"llvm,cranelift","DEPLOY_BUCKET":"rust-lang-ci2","DIST_REQUIRE_ALL_TOOLS":1,"RUST_CONFIGURE_ARGS":"--build=i686-pc-windows-msvc --host=i686-pc-windows-msvc --target=i686-pc-windows-msvc,i586-pc-windows-msvc --enable-full-tools --enable-profiler","SCRIPT":"python x.py dist bootstrap --include-default-paths","TOOLSTATE_PUBLISH":1}},{"name":"pr-check-1","full_name":"auto - pr-check-1","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"continue_on_error":false,"free_disk":true},{"name":"pr-check-2","full_name":"auto - pr-check-2","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"continue_on_error":false,"free_disk":true},{"name":"tidy","full_name":"auto - tidy","os":"ubuntu-24.04","env":{"ARTIFACTS_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZN24CBO55","AWS_REGION":"us-west-1","CACHES_AWS_ACCESS_KEY_ID":"AKIA46X5W6CZI5DHEBFL","DEPLOY_BUCKET":"rust-lang-ci2","TOOLSTATE_PUBLISH":1},"continue_on_error":false,"free_disk":true,"doc_url":"https://foo.bar"}] run_type=auto "#); } diff --git a/src/ci/citool/tests/test-jobs.yml b/src/ci/citool/tests/test-jobs.yml index 95cd328e78486..b2dded6a98e2f 100644 --- a/src/ci/citool/tests/test-jobs.yml +++ b/src/ci/citool/tests/test-jobs.yml @@ -113,7 +113,6 @@ auto: --set rust.jemalloc RUSTC_RETRY_LINKER_ON_SEGFAULT: 1 DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer - USE_XCODE_CLANG: 1 # Aarch64 tooling only needs to support macOS 11.0 and up as nothing else # supports the hardware, so only need to test it there. MACOSX_DEPLOYMENT_TARGET: 11.0 diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 6f333ecde79be..dec8876519ed6 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -460,7 +460,6 @@ auto: MACOSX_DEPLOYMENT_TARGET: 10.12 MACOSX_STD_DEPLOYMENT_TARGET: 10.12 DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer - USE_XCODE_CLANG: 1 DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift <<: *job-macos @@ -497,7 +496,6 @@ auto: MACOSX_DEPLOYMENT_TARGET: 11.0 MACOSX_STD_DEPLOYMENT_TARGET: 11.0 DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer - USE_XCODE_CLANG: 1 DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift <<: *job-macos @@ -512,7 +510,6 @@ auto: --enable-profiler --set rust.jemalloc DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer - USE_XCODE_CLANG: 1 # Aarch64 tooling only needs to support macOS 11.0 and up as nothing else # supports the hardware, so only need to test it there. MACOSX_DEPLOYMENT_TARGET: 11.0 diff --git a/src/ci/scripts/install-clang.sh b/src/ci/scripts/install-clang.sh index 657e1492a6d63..889f6ea692bcc 100755 --- a/src/ci/scripts/install-clang.sh +++ b/src/ci/scripts/install-clang.sh @@ -9,35 +9,28 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" -# Update both macOS's and Windows's tarballs when bumping the version here. +# Update Windows's tarballs when bumping the version here. # Try to keep this in sync with src/ci/docker/scripts/build-clang.sh LLVM_VERSION="20.1.3" if isMacOS; then - # FIXME: This is the latest pre-built version of LLVM that's available for - # x86_64 MacOS. We may want to consider building our own LLVM binaries - # instead, or set `USE_XCODE_CLANG` like AArch64 does. - LLVM_VERSION="15.0.7" - - # If the job selects a specific Xcode version, use that instead of - # downloading our own version. - if [[ ${USE_XCODE_CLANG-0} -eq 1 ]]; then - bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin" - else - file="${MIRRORS_BASE}/clang%2Bllvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz" - retry curl -f "${file}" -o "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz" - tar xJf "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz" - bindir="$(pwd)/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0/bin" - fi + # Clang comes preinstalled on macOS via Xcode, so let's use that. + # + # Besides, it's kind of a hazzle to install it manually, since LLVM no + # longer provide prebuilt macOS x86_64 binaries. + bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin" ciCommandSetEnv CC "${bindir}/clang" ciCommandSetEnv CXX "${bindir}/clang++" - # macOS 10.15 onwards doesn't have libraries in /usr/include anymore: those - # are now located deep into the filesystem, under Xcode's own files. The - # native clang is configured to use the correct path, but our custom one - # doesn't. This sets the SDKROOT environment variable to the SDK so that - # our own clang can figure out the correct include path on its own. + # macOS 10.15 onwards doesn't have libraries in /usr/include anymore: + # those are now located deep into the filesystem, under Xcode's own files. + # + # The binary in `/usr/bin/clang` is a magical "trampoline" binary that + # sets this environment variable and invokes the real Clang binary, which + # makes invoking `clang` still work in the common case, but since we point + # to the real Clang binary directly above, we need to also set this + # variable ourselves. ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)" # Configure `AR` specifically so bootstrap doesn't try to infer it as From 19a7bd9a97e087e2070396d3310f7aee8aa89898 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 3 Feb 2026 00:43:13 +0100 Subject: [PATCH 2/5] Remove AR=ar env var Bootstrap no longer infers the archiver as `clang-ar`, so we don't need to set this explicitly. --- src/ci/scripts/install-clang.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ci/scripts/install-clang.sh b/src/ci/scripts/install-clang.sh index 889f6ea692bcc..bd929a975e322 100755 --- a/src/ci/scripts/install-clang.sh +++ b/src/ci/scripts/install-clang.sh @@ -32,10 +32,6 @@ if isMacOS; then # to the real Clang binary directly above, we need to also set this # variable ourselves. ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)" - - # Configure `AR` specifically so bootstrap doesn't try to infer it as - # `clang-ar` by accident. - ciCommandSetEnv AR "ar" elif isWindows && ! isKnownToBeMingwBuild; then # If we're compiling for MSVC then we, like most other distribution builders, # switch to clang as the compiler. This'll allow us eventually to enable LTO From 3882573751461114c16817006a0c9f04387c546e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 3 Feb 2026 00:46:24 +0100 Subject: [PATCH 3/5] Always use default Clang on macOS Instead of manually setting up CC/CXX environment variables, use the default configuration that Xcode gives us. --- src/ci/scripts/install-clang.sh | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/ci/scripts/install-clang.sh b/src/ci/scripts/install-clang.sh index bd929a975e322..75e8fc240660d 100755 --- a/src/ci/scripts/install-clang.sh +++ b/src/ci/scripts/install-clang.sh @@ -13,26 +13,7 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" # Try to keep this in sync with src/ci/docker/scripts/build-clang.sh LLVM_VERSION="20.1.3" -if isMacOS; then - # Clang comes preinstalled on macOS via Xcode, so let's use that. - # - # Besides, it's kind of a hazzle to install it manually, since LLVM no - # longer provide prebuilt macOS x86_64 binaries. - bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin" - - ciCommandSetEnv CC "${bindir}/clang" - ciCommandSetEnv CXX "${bindir}/clang++" - - # macOS 10.15 onwards doesn't have libraries in /usr/include anymore: - # those are now located deep into the filesystem, under Xcode's own files. - # - # The binary in `/usr/bin/clang` is a magical "trampoline" binary that - # sets this environment variable and invokes the real Clang binary, which - # makes invoking `clang` still work in the common case, but since we point - # to the real Clang binary directly above, we need to also set this - # variable ourselves. - ciCommandSetEnv SDKROOT "$(xcrun --sdk macosx --show-sdk-path)" -elif isWindows && ! isKnownToBeMingwBuild; then +if isWindows && ! isKnownToBeMingwBuild; then # If we're compiling for MSVC then we, like most other distribution builders, # switch to clang as the compiler. This'll allow us eventually to enable LTO # amongst LLVM and rustc. Note that we only do this on MSVC as I don't think From d0aa33714699924989cf36660dae236dec4c2e06 Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Thu, 27 Feb 2025 08:50:01 +0900 Subject: [PATCH 4/5] feat: Add `NonZero::::from_str_radix` --- library/core/src/num/nonzero.rs | 70 ++++++++++++++++++++++++++++-- library/coretests/tests/lib.rs | 1 + library/coretests/tests/nonzero.rs | 35 +++++++++++++++ 3 files changed, 102 insertions(+), 4 deletions(-) diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 2b5279efb7f79..16de01406d8c0 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -1240,16 +1240,78 @@ macro_rules! nonzero_integer { // So the result cannot be zero. unsafe { Self::new_unchecked(self.get().saturating_pow(other)) } } + + /// Parses a non-zero integer from a string slice with digits in a given base. + /// + /// The string is expected to be an optional + #[doc = sign_dependent_expr!{ + $signedness ? + if signed { + " `+` or `-` " + } + if unsigned { + " `+` " + } + }] + /// sign followed by only digits. Leading and trailing non-digit characters (including + /// whitespace) represent an error. Underscores (which are accepted in Rust literals) + /// also represent an error. + /// + /// Digits are a subset of these characters, depending on `radix`: + /// + /// - `0-9` + /// - `a-z` + /// - `A-Z` + /// + /// # Panics + /// + /// This method panics if `radix` is not in the range from 2 to 36. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// #![feature(nonzero_from_str_radix)] + /// + /// # use std::num::NonZero; + /// # + /// # fn main() { test().unwrap(); } + /// # fn test() -> Option<()> { + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::from_str_radix(\"A\", 16), Ok(NonZero::new(10)?));")] + /// # Some(()) + /// # } + /// ``` + /// + /// Trailing space returns error: + /// + /// ``` + /// #![feature(nonzero_from_str_radix)] + /// + /// # use std::num::NonZero; + /// # + #[doc = concat!("assert!(NonZero::<", stringify!($Int), ">::from_str_radix(\"1 \", 10).is_err());")] + /// ``` + #[unstable(feature = "nonzero_from_str_radix", issue = "152193")] + #[inline] + pub const fn from_str_radix(src: &str, radix: u32) -> Result { + let n = match <$Int>::from_str_radix(src, radix) { + Ok(n) => n, + Err(err) => return Err(err), + }; + if let Some(n) = Self::new(n) { + Ok(n) + } else { + Err(ParseIntError { kind: IntErrorKind::Zero }) + } + } } #[stable(feature = "nonzero_parse", since = "1.35.0")] impl FromStr for NonZero<$Int> { type Err = ParseIntError; fn from_str(src: &str) -> Result { - Self::new(<$Int>::from_str_radix(src, 10)?) - .ok_or(ParseIntError { - kind: IntErrorKind::Zero - }) + Self::from_str_radix(src, 10) } } diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index d085e4ad1a8fe..91a7c898b2999 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -90,6 +90,7 @@ #![feature(new_range_api)] #![feature(next_index)] #![feature(non_exhaustive_omitted_patterns_lint)] +#![feature(nonzero_from_str_radix)] #![feature(numfmt)] #![feature(one_sided_range)] #![feature(option_reduce)] diff --git a/library/coretests/tests/nonzero.rs b/library/coretests/tests/nonzero.rs index c368a2621740b..134f875925f97 100644 --- a/library/coretests/tests/nonzero.rs +++ b/library/coretests/tests/nonzero.rs @@ -124,6 +124,41 @@ fn test_from_signed_nonzero() { assert_eq!(num, 1i32); } +#[test] +fn test_from_str_radix() { + assert_eq!(NonZero::::from_str_radix("123", 10), Ok(NonZero::new(123).unwrap())); + assert_eq!(NonZero::::from_str_radix("1001", 2), Ok(NonZero::new(9).unwrap())); + assert_eq!(NonZero::::from_str_radix("123", 8), Ok(NonZero::new(83).unwrap())); + assert_eq!(NonZero::::from_str_radix("123", 16), Ok(NonZero::new(291).unwrap())); + assert_eq!(NonZero::::from_str_radix("ffff", 16), Ok(NonZero::new(65535).unwrap())); + assert_eq!(NonZero::::from_str_radix("z", 36), Ok(NonZero::new(35).unwrap())); + assert_eq!( + NonZero::::from_str_radix("0", 10).err().map(|e| e.kind().clone()), + Some(IntErrorKind::Zero) + ); + assert_eq!( + NonZero::::from_str_radix("-1", 10).err().map(|e| e.kind().clone()), + Some(IntErrorKind::InvalidDigit) + ); + assert_eq!( + NonZero::::from_str_radix("-129", 10).err().map(|e| e.kind().clone()), + Some(IntErrorKind::NegOverflow) + ); + assert_eq!( + NonZero::::from_str_radix("257", 10).err().map(|e| e.kind().clone()), + Some(IntErrorKind::PosOverflow) + ); + + assert_eq!( + NonZero::::from_str_radix("Z", 10).err().map(|e| e.kind().clone()), + Some(IntErrorKind::InvalidDigit) + ); + assert_eq!( + NonZero::::from_str_radix("_", 2).err().map(|e| e.kind().clone()), + Some(IntErrorKind::InvalidDigit) + ); +} + #[test] fn test_from_str() { assert_eq!("123".parse::>(), Ok(NonZero::new(123).unwrap())); From ee2c39a2b4f0e7075bd1b5dc08a75dc106c8fa29 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Fri, 6 Feb 2026 22:24:36 +0900 Subject: [PATCH 5/5] re-add TaKO8Ki to triagebot review queue --- triagebot.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/triagebot.toml b/triagebot.toml index eb25d6e1b2015..1b0ba07ecf119 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -1466,6 +1466,7 @@ compiler = [ "@oli-obk", "@petrochenkov", "@SparrowLii", + "@TaKO8Ki", "@tiif", "@WaffleLapkin", "@wesleywiser", @@ -1512,6 +1513,7 @@ diagnostics = [ "@davidtwco", "@oli-obk", "@chenyukang", + "@TaKO8Ki" ] parser = [ "@davidtwco",