Expose the support module publicly with a test feature

This commit is contained in:
Trevor Gross 2024-10-31 23:52:27 -05:00 committed by Trevor Gross
parent 5f54ad6389
commit 4b12a8404f
3 changed files with 12 additions and 1 deletions

View File

@ -26,6 +26,9 @@ unstable = ["unstable-intrinsics"]
# Enable calls to functions in `core::intrinsics`
unstable-intrinsics = []
# Make some internal things public for testing.
unstable-test-support = []
# Used to prevent using any intrinsics or arch-specific code.
#
# HACK: this is a negative feature which is generally a bad idea in Cargo, but

View File

@ -13,6 +13,7 @@ bench = false
# Duplicated from libm's Cargo.toml
unstable = []
unstable-intrinsics = []
unstable-test-support = []
checked = []
force-soft-floats = []

View File

@ -74,9 +74,16 @@ macro_rules! div {
};
}
// Private modules
// `support` may be public for testing
#[macro_use]
#[cfg(feature = "unstable-test-support")]
pub mod support;
#[macro_use]
#[cfg(not(feature = "unstable-test-support"))]
mod support;
// Private modules
mod arch;
mod expo2;
mod fenv;