Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit dc15fdd

Browse files
committed
Include shared.rs in libm_test::op
These types from `libm-macros` provide a way to get information about an operation at runtime, rather than only being encoded in the type system. Include the file and reexport relevant types.
1 parent 971bafa commit dc15fdd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

crates/libm-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod test_traits;
1313
pub use f8_impl::f8;
1414
pub use libm::support::{Float, Int, IntTy, MinInt};
1515
pub use num::{FloatExt, logspace};
16-
pub use op::{BaseName, Identifier, MathOp, OpCFn, OpFTy, OpRustFn, OpRustRet};
16+
pub use op::{BaseName, FloatTy, Identifier, MathOp, OpCFn, OpFTy, OpRustFn, OpRustRet, Ty};
1717
pub use precision::{MaybeOverride, SpecialCase, default_ulp};
1818
pub use test_traits::{CheckBasis, CheckCtx, CheckOutput, GenerateInput, Hex, TupleCall};
1919

crates/libm-test/src/op.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@
1313
//! - "Operation" / "Op": Something that relates a routine to a function or is otherwise higher
1414
//! level. `Op` is also used as the name for generic parameters since it is terse.
1515
16+
use std::fmt;
17+
18+
pub use shared::{ALL_OPERATIONS, FloatTy, MathOpInfo, Ty};
19+
1620
use crate::{CheckOutput, Float, TupleCall};
1721

22+
mod shared {
23+
include!("../../libm-macros/src/shared.rs");
24+
}
25+
1826
/// An enum representing each possible symbol name (`sin`, `sinf`, `sinl`, etc).
1927
#[libm_macros::function_enum(BaseName)]
2028
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)