From 8742762dd8af0743ca0618b4070dcce7cc183548 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Thu, 5 Nov 2026 14:50:22 -0500 Subject: [PATCH 1/3] blobby: don't PlaceMention an uninitialized local in `parse_into_structs` Our MSRV is too old for `cfg(false)`, so we use `cfg(any())` instead. --- blobby/src/decode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blobby/src/decode.rs b/blobby/src/decode.rs index 8331746f..4c866625 100644 --- a/blobby/src/decode.rs +++ b/blobby/src/decode.rs @@ -254,7 +254,7 @@ macro_rules! parse_into_structs { } const ITEM_FIELDS: usize = 0 $( + { - let $field: (); let _ = $field; + #[cfg(any())] { $field } 1 })*; From eff10f17440c3564f81dabc17d9a06e4605ac711 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Sat, 7 Nov 2026 13:46:10 +0300 Subject: [PATCH 2/3] tweak --- blobby/src/decode.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blobby/src/decode.rs b/blobby/src/decode.rs index 4c866625..66c2b123 100644 --- a/blobby/src/decode.rs +++ b/blobby/src/decode.rs @@ -253,8 +253,11 @@ macro_rules! parse_into_structs { } } + // TODO: use `${count(field)}` on stabilization of `macro_metavar_expr`: + // https://github.com/rust-lang/rust/issues/83527 const ITEM_FIELDS: usize = 0 $( + { - #[cfg(any())] { $field } + let $field = (); + let _ = $field; 1 })*; From 252572e1b467a0600a5e7184c58cf3d45b8fbaee Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Sat, 7 Nov 2026 13:48:22 +0300 Subject: [PATCH 3/3] Add changelog entry --- blobby/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blobby/CHANGELOG.md b/blobby/CHANGELOG.md index b7bcfce8..6fcb6df0 100644 --- a/blobby/CHANGELOG.md +++ b/blobby/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.4.1 (UNRELEASED) +### Changed +- Don't `PlaceMention` an uninitialized local in `parse_into_structs` ([#1588]) + +[#1588]: https://github.com/RustCrypto/utils/pull/1588 + ## 0.4.0 (2025-10-08) ### Changed - Edition changed to 2024 and MSRV bumped to 1.85 ([#1149])