Skip to content

Commit 80a0160

Browse files
committed
Expose the support module publicly with a test feature
1 parent 4384fc7 commit 80a0160

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ unstable = ["unstable-intrinsics"]
2626
# Enable calls to functions in `core::intrinsics`
2727
unstable-intrinsics = []
2828

29+
# Make some internal things public for testing.
30+
unstable-test-support = []
31+
2932
# Used to prevent using any intrinsics or arch-specific code.
3033
#
3134
# HACK: this is a negative feature which is generally a bad idea in Cargo, but

crates/compiler-builtins-smoke-test/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ bench = false
1313
# Duplicated from libm's Cargo.toml
1414
unstable = []
1515
unstable-intrinsics = []
16+
unstable-test-support = []
1617
checked = []
1718
force-soft-floats = []
1819

src/math/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,16 @@ macro_rules! div {
7474
};
7575
}
7676

77-
// Private modules
77+
// `support` may be public for testing
78+
#[macro_use]
79+
#[cfg(feature = "unstable-test-support")]
80+
pub mod support;
81+
7882
#[macro_use]
83+
#[cfg(not(feature = "unstable-test-support"))]
7984
mod support;
85+
86+
// Private modules
8087
mod arch;
8188
mod expo2;
8289
mod fenv;

0 commit comments

Comments
 (0)