Use rustdoc output to create a list of public API
Rather than collecting a list of file names in `libm-test/build.rs`, just use a script to parse rustdoc's JSON output.
This commit is contained in:
@@ -23,9 +23,6 @@ pub use test_traits::{CheckOutput, GenerateInput, Hex, TupleCall};
|
||||
/// propagate.
|
||||
pub type TestResult<T = (), E = anyhow::Error> = Result<T, E>;
|
||||
|
||||
// List of all files present in libm's source
|
||||
include!(concat!(env!("OUT_DIR"), "/all_files.rs"));
|
||||
|
||||
/// True if `EMULATED` is set and nonempty. Used to determine how many iterations to run.
|
||||
pub const fn emulated() -> bool {
|
||||
match option_env!("EMULATED") {
|
||||
@@ -34,3 +31,12 @@ pub const fn emulated() -> bool {
|
||||
Some(_) => true,
|
||||
}
|
||||
}
|
||||
|
||||
/// True if `CI` is set and nonempty.
|
||||
pub const fn ci() -> bool {
|
||||
match option_env!("CI") {
|
||||
Some(s) if s.is_empty() => false,
|
||||
None => false,
|
||||
Some(_) => true,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user