File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " gridiron"
3- version = " 0.12.1 "
3+ version = " 0.12.2 "
44edition = " 2024"
55authors = [" IronCore Labs <code at ironcorelabs.com>" ]
66repository = " https://github.com/IronCoreLabs/gridiron"
Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ pub fn split_u128_to_62b(i: u128) -> (u64, u64) {
176176 ( ( i >> 62 ) as u64 , ( i & 0x3FFFFFFFFFFFFFFF ) as u64 )
177177}
178178
179+ /// WARNING: This macro is always exported, but will generate code that depends on proptest. Don't call it
180+ /// in a location where that won't compile.
181+ ///
179182/// Shared proptest strategy for generating arbitrary field elements with edge case coverage.
180183///
181184/// This macro generates an `arb_fp` function that produces field elements with:
@@ -190,7 +193,11 @@ pub fn split_u128_to_62b(i: u128) -> (u64, u64) {
190193/// - `$limbsizebits`: Bits per limb (31 or 62)
191194/// - `$limbtype`: Limb type (`u32` or `u64`)
192195/// - `$limb_mask`: Mask for valid limb bits (`0x7FFFFFFFu32` or `0x3FFFFFFFFFFFFFFFu64`)
193- #[ cfg( test) ]
196+ ///
197+ /// Note: This macro must NOT be gated by `#[cfg(test)]` because it's referenced via
198+ /// `$crate::define_arb_fp!` from within the `fp31!`/`fp62!` macros' test modules.
199+ /// When a downstream crate runs tests, `$crate` refers to gridiron compiled as a
200+ /// dependency (not in test mode), so the macro must always be exported.
194201#[ macro_export]
195202macro_rules! define_arb_fp {
196203 ( $classname: ident, $limbsizebits: expr, $limbtype: ty, $limb_mask: expr) => {
You can’t perform that action at this time.
0 commit comments