From e13ca348dd9cb6f1ed3b62d2f6f9e0207e9284f6 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Tue, 13 Feb 2024 10:04:22 +0000 Subject: [PATCH] Feature-gate UInt::one --- src/seq/index.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/seq/index.rs b/src/seq/index.rs index 956ea60ed8..d83ed908a6 100644 --- a/src/seq/index.rs +++ b/src/seq/index.rs @@ -424,6 +424,7 @@ where R: Rng + ?Sized { trait UInt: Copy + PartialOrd + Ord + PartialEq + Eq + SampleUniform + core::hash::Hash + core::ops::AddAssign { fn zero() -> Self; + #[cfg(feature = "std")] fn one() -> Self; fn as_usize(self) -> usize; } @@ -433,6 +434,7 @@ impl UInt for u32 { 0 } + #[cfg(feature = "std")] #[inline] fn one() -> Self { 1 @@ -449,6 +451,7 @@ impl UInt for usize { 0 } + #[cfg(feature = "std")] #[inline] fn one() -> Self { 1