diff --git a/src/field.rs b/src/field.rs index 23362e8..e6f2587 100644 --- a/src/field.rs +++ b/src/field.rs @@ -184,6 +184,7 @@ impl FieldElement { /// /// This function is most efficient when the batch size (slice /// length) is a power of 2. + #[cfg(any(feature = "alloc", feature = "std"))] pub fn batch_invert(inputs: &mut [FieldElement]) { // First, compute the product of all inputs using a product // tree: diff --git a/src/ristretto.rs b/src/ristretto.rs index 50f9b96..ee6260e 100644 --- a/src/ristretto.rs +++ b/src/ristretto.rs @@ -667,6 +667,7 @@ impl RistrettoPoint { } /// Double-and-compress a batch of points. + #[cfg(any(feature = "alloc", feature = "std"))] pub fn double_and_compress_batch<'a, I>(points: I) -> Vec where I: IntoIterator {