From 7476129c8a4431a46cc3bb80e41cc54a01b8cf51 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Fri, 10 Jan 2025 13:45:07 +0100 Subject: [PATCH] limb: Unmerge `usize_from_u32` import from `"alloc"`-guarded `use` Since commit e88750b87 ("Define native word size as `constant_time::Word`.") `usize_from_u32()` is unconditionally used in and via global `const`s but was (likely accidentally by means of `rust-analyzer`) merged into a `use` statement that's guarded by `feature = "alloc"`. When compiling this crate without that feature, which happens with `default-features = false`, this fails to compile due to missing the import. Moving the import to the unguarded `use crate::` group solves this. --- src/limb.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/limb.rs b/src/limb.rs index cda13c04bd..db6c51a43b 100644 --- a/src/limb.rs +++ b/src/limb.rs @@ -20,11 +20,11 @@ use crate::{ c, constant_time, error, - polyfill::{slice, ArrayFlatMap}, + polyfill::{slice, usize_from_u32, ArrayFlatMap}, }; #[cfg(any(test, feature = "alloc"))] -use crate::{bits, polyfill::usize_from_u32}; +use crate::bits; #[cfg(feature = "alloc")] use core::num::Wrapping;