From 84a6e157c798d6bc26e378a5a95e00e3c51049bf Mon Sep 17 00:00:00 2001 From: SSD Date: Sat, 24 Jan 2026 08:54:39 +0100 Subject: [PATCH 1/3] Update libm and simplify where it's used --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- cranelift/codegen/src/ir/immediates.rs | 19 +------------------ 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4e1876bf1d24..bdf0e8e4756c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2217,9 +2217,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libtest-mimic" diff --git a/Cargo.toml b/Cargo.toml index c37eeae36e4a..07500dcf48fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -419,7 +419,7 @@ rustc-hash = { version = "2.1.1", default-features = false } libtest-mimic = "0.8.1" semver = { version = "1.0.27", default-features = false } ittapi = "0.4.0" -libm = "0.2.15" +libm = "0.2.16" tokio-rustls = "0.25.0" rustls = "0.22.0" tokio-native-tls = "0.3.1" diff --git a/cranelift/codegen/src/ir/immediates.rs b/cranelift/codegen/src/ir/immediates.rs index f53b2180de37..8bfcba2a32ce 100644 --- a/cranelift/codegen/src/ir/immediates.rs +++ b/cranelift/codegen/src/ir/immediates.rs @@ -705,24 +705,7 @@ macro_rules! ieee_float { /// with an even least significant digit. pub fn round_ties_even(self) -> Self { // TODO: when libm v0.2.16 is published line below can be used instead - // Self::with_float(Libm::<$float_ty>::roundeven(self.$as_float())) - return Self::with_float(self.$as_float().roundeven()); - - trait Roundeven { - fn roundeven(self) -> Self; - } - - impl Roundeven for f32 { - fn roundeven(self) -> Self { - libm::roundevenf(self) - } - } - - impl Roundeven for f64 { - fn roundeven(self) -> Self { - libm::roundeven(self) - } - } + Self::with_float(Libm::<$float_ty>::roundeven(self.$as_float())) } )? } From 4b489b9a2ecbc8a943fd05147e2567726a5bb5e3 Mon Sep 17 00:00:00 2001 From: SSD <96286755+the-ssd@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:53:09 +0100 Subject: [PATCH 2/3] Remove TODO comment in round_ties_even function Removed TODO comment regarding libm version. --- cranelift/codegen/src/ir/immediates.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/cranelift/codegen/src/ir/immediates.rs b/cranelift/codegen/src/ir/immediates.rs index 8bfcba2a32ce..563e5e42cde7 100644 --- a/cranelift/codegen/src/ir/immediates.rs +++ b/cranelift/codegen/src/ir/immediates.rs @@ -704,7 +704,6 @@ macro_rules! ieee_float { /// Returns the nearest integer to `self`. Rounds half-way cases to the number /// with an even least significant digit. pub fn round_ties_even(self) -> Self { - // TODO: when libm v0.2.16 is published line below can be used instead Self::with_float(Libm::<$float_ty>::roundeven(self.$as_float())) } )? From ce6f53aecbcc9b5e711c3d7a5c7b352367fc513e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 1 Feb 2026 20:03:45 -0800 Subject: [PATCH 3/3] Update vets --- supply-chain/imports.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index 4e6b1384689e..4fe72b84c7d4 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -778,8 +778,8 @@ user-id = 55123 user-login = "rust-lang-owner" [[publisher.libm]] -version = "0.2.15" -when = "2025-05-06" +version = "0.2.16" +when = "2026-01-24" user-id = 55123 user-login = "rust-lang-owner"