about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-12-13 19:53:04 +0100
committerUrgau <urgau@numericable.fr>2025-01-20 18:35:32 +0100
commit8e615024844030e5148ee6d22efc5bcaa48c5311 (patch)
tree7855ce7297ce1f339b4d1c6cf6a3d49bc6633f48 /src
parent0f30662147edad559ef7f8ec57cc4d17f4ba5dc2 (diff)
downloadrust-8e615024844030e5148ee6d22efc5bcaa48c5311.tar.gz
rust-8e615024844030e5148ee6d22efc5bcaa48c5311.zip
core: add `#![warn(unreachable_pub)]`
Diffstat (limited to 'src')
-rwxr-xr-xsrc/etc/dec2flt_table.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/dec2flt_table.py b/src/etc/dec2flt_table.py
index 791186de9c1..ecfdacc1f31 100755
--- a/src/etc/dec2flt_table.py
+++ b/src/etc/dec2flt_table.py
@@ -43,10 +43,10 @@ def main():
 
     print(HEADER.strip())
     print()
-    print("pub const SMALLEST_POWER_OF_FIVE: i32 = {};".format(min_exp))
-    print("pub const LARGEST_POWER_OF_FIVE: i32 = {};".format(max_exp))
-    print("pub const N_POWERS_OF_FIVE: usize = ", end="")
-    print("(LARGEST_POWER_OF_FIVE - SMALLEST_POWER_OF_FIVE + 1) as usize;")
+    print("pub(super) const SMALLEST_POWER_OF_FIVE: i32 = {};".format(min_exp))
+    print("pub(super) const LARGEST_POWER_OF_FIVE: i32 = {};".format(max_exp))
+    print("pub(super) const N_POWERS_OF_FIVE: usize =")
+    print("    (LARGEST_POWER_OF_FIVE - SMALLEST_POWER_OF_FIVE + 1) as usize;")
     print()
     print_proper_powers(min_exp, max_exp, bias)
 
@@ -97,7 +97,7 @@ def print_proper_powers(min_exp, max_exp, bias):
     print(STATIC_WARNING.strip())
     print("#[rustfmt::skip]")
     typ = "[(u64, u64); N_POWERS_OF_FIVE]"
-    print("pub static POWER_OF_FIVE_128: {} = [".format(typ))
+    print("pub(super) static POWER_OF_FIVE_128: {} = [".format(typ))
     for c, exp in powers:
         hi = "0x{:x}".format(c // (1 << 64))
         lo = "0x{:x}".format(c % (1 << 64))