Do not add libm_helper.rs to the sources list

This is just a collection of all functions and should not trigger
extensive tests when changed.
This commit is contained in:
Trevor Gross 2025-02-05 15:02:17 +00:00
parent cc1a55a77e
commit f7765fae89
2 changed files with 9 additions and 57 deletions

View file

@ -2,7 +2,6 @@
"__comment": "Autogenerated by update-api-list.py. List of files that define a function with a given name. This file is checked in to make it obvious if refactoring breaks things",
"acos": {
"sources": [
"src/libm_helper.rs",
"src/math/acos.rs"
],
"type": "f64"
@ -15,7 +14,6 @@
},
"acosh": {
"sources": [
"src/libm_helper.rs",
"src/math/acosh.rs"
],
"type": "f64"
@ -28,7 +26,6 @@
},
"asin": {
"sources": [
"src/libm_helper.rs",
"src/math/asin.rs"
],
"type": "f64"
@ -41,7 +38,6 @@
},
"asinh": {
"sources": [
"src/libm_helper.rs",
"src/math/asinh.rs"
],
"type": "f64"
@ -54,14 +50,12 @@
},
"atan": {
"sources": [
"src/libm_helper.rs",
"src/math/atan.rs"
],
"type": "f64"
},
"atan2": {
"sources": [
"src/libm_helper.rs",
"src/math/atan2.rs"
],
"type": "f64"
@ -80,7 +74,6 @@
},
"atanh": {
"sources": [
"src/libm_helper.rs",
"src/math/atanh.rs"
],
"type": "f64"
@ -93,7 +86,6 @@
},
"cbrt": {
"sources": [
"src/libm_helper.rs",
"src/math/cbrt.rs"
],
"type": "f64"
@ -106,7 +98,6 @@
},
"ceil": {
"sources": [
"src/libm_helper.rs",
"src/math/arch/i586.rs",
"src/math/arch/wasm32.rs",
"src/math/ceil.rs",
@ -138,7 +129,6 @@
},
"copysign": {
"sources": [
"src/libm_helper.rs",
"src/math/copysign.rs",
"src/math/generic/copysign.rs",
"src/math/support/float_traits.rs"
@ -168,7 +158,6 @@
},
"cos": {
"sources": [
"src/libm_helper.rs",
"src/math/cos.rs"
],
"type": "f64"
@ -181,7 +170,6 @@
},
"cosh": {
"sources": [
"src/libm_helper.rs",
"src/math/cosh.rs"
],
"type": "f64"
@ -194,14 +182,12 @@
},
"erf": {
"sources": [
"src/libm_helper.rs",
"src/math/erf.rs"
],
"type": "f64"
},
"erfc": {
"sources": [
"src/libm_helper.rs",
"src/math/erf.rs"
],
"type": "f64"
@ -220,7 +206,6 @@
},
"exp": {
"sources": [
"src/libm_helper.rs",
"src/math/exp.rs",
"src/math/support/float_traits.rs"
],
@ -228,7 +213,6 @@
},
"exp10": {
"sources": [
"src/libm_helper.rs",
"src/math/exp10.rs"
],
"type": "f64"
@ -241,7 +225,6 @@
},
"exp2": {
"sources": [
"src/libm_helper.rs",
"src/math/exp2.rs"
],
"type": "f64"
@ -260,7 +243,6 @@
},
"expm1": {
"sources": [
"src/libm_helper.rs",
"src/math/expm1.rs"
],
"type": "f64"
@ -273,7 +255,6 @@
},
"fabs": {
"sources": [
"src/libm_helper.rs",
"src/math/arch/wasm32.rs",
"src/math/fabs.rs",
"src/math/generic/fabs.rs"
@ -304,7 +285,6 @@
},
"fdim": {
"sources": [
"src/libm_helper.rs",
"src/math/fdim.rs",
"src/math/generic/fdim.rs"
],
@ -333,7 +313,6 @@
},
"floor": {
"sources": [
"src/libm_helper.rs",
"src/math/arch/i586.rs",
"src/math/arch/wasm32.rs",
"src/math/floor.rs",
@ -365,7 +344,6 @@
},
"fma": {
"sources": [
"src/libm_helper.rs",
"src/math/fma.rs"
],
"type": "f64"
@ -378,7 +356,6 @@
},
"fmax": {
"sources": [
"src/libm_helper.rs",
"src/math/fmax.rs",
"src/math/generic/fmax.rs"
],
@ -407,7 +384,6 @@
},
"fmin": {
"sources": [
"src/libm_helper.rs",
"src/math/fmin.rs",
"src/math/generic/fmin.rs"
],
@ -436,7 +412,6 @@
},
"fmod": {
"sources": [
"src/libm_helper.rs",
"src/math/fmod.rs",
"src/math/generic/fmod.rs"
],
@ -465,7 +440,6 @@
},
"frexp": {
"sources": [
"src/libm_helper.rs",
"src/math/frexp.rs"
],
"type": "f64"
@ -478,7 +452,6 @@
},
"hypot": {
"sources": [
"src/libm_helper.rs",
"src/math/hypot.rs"
],
"type": "f64"
@ -491,7 +464,6 @@
},
"ilogb": {
"sources": [
"src/libm_helper.rs",
"src/math/ilogb.rs"
],
"type": "f64"
@ -504,7 +476,6 @@
},
"j0": {
"sources": [
"src/libm_helper.rs",
"src/math/j0.rs"
],
"type": "f64"
@ -517,7 +488,6 @@
},
"j1": {
"sources": [
"src/libm_helper.rs",
"src/math/j1.rs"
],
"type": "f64"
@ -530,7 +500,6 @@
},
"jn": {
"sources": [
"src/libm_helper.rs",
"src/math/jn.rs"
],
"type": "f64"
@ -543,7 +512,6 @@
},
"ldexp": {
"sources": [
"src/libm_helper.rs",
"src/math/ldexp.rs"
],
"type": "f64"
@ -568,14 +536,12 @@
},
"lgamma": {
"sources": [
"src/libm_helper.rs",
"src/math/lgamma.rs"
],
"type": "f64"
},
"lgamma_r": {
"sources": [
"src/libm_helper.rs",
"src/math/lgamma_r.rs"
],
"type": "f64"
@ -594,14 +560,12 @@
},
"log": {
"sources": [
"src/libm_helper.rs",
"src/math/log.rs"
],
"type": "f64"
},
"log10": {
"sources": [
"src/libm_helper.rs",
"src/math/log10.rs"
],
"type": "f64"
@ -614,7 +578,6 @@
},
"log1p": {
"sources": [
"src/libm_helper.rs",
"src/math/log1p.rs"
],
"type": "f64"
@ -627,7 +590,6 @@
},
"log2": {
"sources": [
"src/libm_helper.rs",
"src/math/log2.rs"
],
"type": "f64"
@ -646,7 +608,6 @@
},
"modf": {
"sources": [
"src/libm_helper.rs",
"src/math/modf.rs"
],
"type": "f64"
@ -659,7 +620,6 @@
},
"nextafter": {
"sources": [
"src/libm_helper.rs",
"src/math/nextafter.rs"
],
"type": "f64"
@ -672,7 +632,6 @@
},
"pow": {
"sources": [
"src/libm_helper.rs",
"src/math/pow.rs"
],
"type": "f64"
@ -685,7 +644,6 @@
},
"remainder": {
"sources": [
"src/libm_helper.rs",
"src/math/remainder.rs"
],
"type": "f64"
@ -698,7 +656,6 @@
},
"remquo": {
"sources": [
"src/libm_helper.rs",
"src/math/remquo.rs"
],
"type": "f64"
@ -711,7 +668,6 @@
},
"rint": {
"sources": [
"src/libm_helper.rs",
"src/math/arch/aarch64.rs",
"src/math/arch/wasm32.rs",
"src/math/generic/rint.rs",
@ -744,7 +700,6 @@
},
"round": {
"sources": [
"src/libm_helper.rs",
"src/math/generic/round.rs",
"src/math/round.rs"
],
@ -773,7 +728,6 @@
},
"scalbn": {
"sources": [
"src/libm_helper.rs",
"src/math/generic/scalbn.rs",
"src/math/scalbn.rs"
],
@ -802,14 +756,12 @@
},
"sin": {
"sources": [
"src/libm_helper.rs",
"src/math/sin.rs"
],
"type": "f64"
},
"sincos": {
"sources": [
"src/libm_helper.rs",
"src/math/sincos.rs"
],
"type": "f64"
@ -828,7 +780,6 @@
},
"sinh": {
"sources": [
"src/libm_helper.rs",
"src/math/sinh.rs"
],
"type": "f64"
@ -841,7 +792,6 @@
},
"sqrt": {
"sources": [
"src/libm_helper.rs",
"src/math/arch/i686.rs",
"src/math/arch/wasm32.rs",
"src/math/generic/sqrt.rs",
@ -874,7 +824,6 @@
},
"tan": {
"sources": [
"src/libm_helper.rs",
"src/math/tan.rs"
],
"type": "f64"
@ -887,7 +836,6 @@
},
"tanh": {
"sources": [
"src/libm_helper.rs",
"src/math/tanh.rs"
],
"type": "f64"
@ -900,7 +848,6 @@
},
"tgamma": {
"sources": [
"src/libm_helper.rs",
"src/math/tgamma.rs"
],
"type": "f64"
@ -913,7 +860,6 @@
},
"trunc": {
"sources": [
"src/libm_helper.rs",
"src/math/arch/wasm32.rs",
"src/math/generic/trunc.rs",
"src/math/trunc.rs"
@ -944,7 +890,6 @@
},
"y0": {
"sources": [
"src/libm_helper.rs",
"src/math/j0.rs"
],
"type": "f64"
@ -957,7 +902,6 @@
},
"y1": {
"sources": [
"src/libm_helper.rs",
"src/math/j1.rs"
],
"type": "f64"
@ -970,7 +914,6 @@
},
"yn": {
"sources": [
"src/libm_helper.rs",
"src/math/jn.rs"
],
"type": "f64"

View file

@ -1,6 +1,9 @@
#!/usr/bin/env python3
"""Create a text file listing all public API. This can be used to ensure that all
functions are covered by our macros.
This file additionally does tidy-esque checks that all functions are listed where
needed, or that lists are sorted.
"""
import difflib
@ -15,6 +18,9 @@ from typing import Any, TypeAlias
ETC_DIR = Path(__file__).parent
ROOT_DIR = ETC_DIR.parent
# These files do not trigger a retest.
IGNORED_SOURCES = ["src/libm_helper.rs"]
IndexTy: TypeAlias = dict[str, dict[str, Any]]
"""Type of the `index` item in rustdoc's JSON output"""
@ -120,6 +126,9 @@ class Crate:
for src in (s for s in base_sources if "generic" in s):
sources.add(src)
for src in IGNORED_SOURCES:
sources.discard(src)
# Sort the set
self.defs = {k: sorted(v) for (k, v) in defs.items()}