What changed, and why it matters
This is a minor build hygiene fix. A Rust module that was only used behind an optional feature was triggering a compiler warning when that feature was disabled. The change simply hides the module unless the relevant feature is enabled, silencing the warning. There is no security relevance.
No security action required. Treat as normal maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds #[cfg(feature = "alloc")] to the opcodes module in primitives/src/lib.rs. The module is only used by script, which itself is gated on the alloc feature. Without this guard, building with --no-default-features produced an unused-module lint. The change is purely conditional compilation to satisfy clippy and has no functional or security impact.
Changed components
primitives/src/lib.rsInspect captured patch +1 / −0
diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs
index dc99540a..1d488901 100644
--- a/primitives/src/lib.rs
+++ b/primitives/src/lib.rs
@@ -41,6 +41,7 @@ pub mod _export {
}
mod hash_types;
+#[cfg(feature = "alloc")]
mod opcodes;
pub mod block;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.