about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-05-05 05:40:54 +0000
committerTrevor Gross <t.gross35@gmail.com>2025-05-05 02:31:52 -0400
commit687902c1af4651ca0db9614c0a1ba6431cff266a (patch)
tree52526a6f8955ec96f9ce07c0687142cd420c4e7c
parent5032002c2fc753b9f2734e7723254b57b860f22e (diff)
downloadrust-687902c1af4651ca0db9614c0a1ba6431cff266a.tar.gz
rust-687902c1af4651ca0db9614c0a1ba6431cff266a.zip
Replace `super::super` with `crate::support` where possible
Since `crate::support` now works in both `compiler-builtins` and `libm`,
we can get rid of some of these unusual paths.
-rw-r--r--library/compiler-builtins/libm/src/math/generic/ceil.rs3
-rw-r--r--library/compiler-builtins/libm/src/math/generic/copysign.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fabs.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fdim.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/floor.rs3
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fmax.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fmaximum.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fmaximum_num.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fmin.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fminimum.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fminimum_num.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/fmod.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/rint.rs3
-rw-r--r--library/compiler-builtins/libm/src/math/generic/round.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/scalbn.rs2
-rw-r--r--library/compiler-builtins/libm/src/math/generic/sqrt.rs5
-rw-r--r--library/compiler-builtins/libm/src/math/generic/trunc.rs3
17 files changed, 19 insertions, 22 deletions
diff --git a/library/compiler-builtins/libm/src/math/generic/ceil.rs b/library/compiler-builtins/libm/src/math/generic/ceil.rs
index 499770c0d6d..1072ba7c29b 100644
--- a/library/compiler-builtins/libm/src/math/generic/ceil.rs
+++ b/library/compiler-builtins/libm/src/math/generic/ceil.rs
@@ -7,8 +7,7 @@
 //! performance seems to be better (based on icount) and it does not seem to experience rounding
 //! errors on i386.
 
-use super::super::support::{FpResult, Status};
-use super::super::{Float, Int, IntTy, MinInt};
+use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
 
 #[inline]
 pub fn ceil<F: Float>(x: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/copysign.rs b/library/compiler-builtins/libm/src/math/generic/copysign.rs
index a61af22f04a..da9ce387885 100644
--- a/library/compiler-builtins/libm/src/math/generic/copysign.rs
+++ b/library/compiler-builtins/libm/src/math/generic/copysign.rs
@@ -1,4 +1,4 @@
-use super::super::Float;
+use crate::support::Float;
 
 /// Copy the sign of `y` to `x`.
 #[inline]
diff --git a/library/compiler-builtins/libm/src/math/generic/fabs.rs b/library/compiler-builtins/libm/src/math/generic/fabs.rs
index 0fa0edf9b87..0adfa57d91b 100644
--- a/library/compiler-builtins/libm/src/math/generic/fabs.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fabs.rs
@@ -1,4 +1,4 @@
-use super::super::Float;
+use crate::support::Float;
 
 /// Absolute value.
 #[inline]
diff --git a/library/compiler-builtins/libm/src/math/generic/fdim.rs b/library/compiler-builtins/libm/src/math/generic/fdim.rs
index a63007b191c..289e5fd96f8 100644
--- a/library/compiler-builtins/libm/src/math/generic/fdim.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fdim.rs
@@ -1,4 +1,4 @@
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fdim<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/floor.rs b/library/compiler-builtins/libm/src/math/generic/floor.rs
index 58d1ee4c247..e6dfd8866a4 100644
--- a/library/compiler-builtins/libm/src/math/generic/floor.rs
+++ b/library/compiler-builtins/libm/src/math/generic/floor.rs
@@ -7,8 +7,7 @@
 //! performance seems to be better (based on icount) and it does not seem to experience rounding
 //! errors on i386.
 
-use super::super::support::{FpResult, Status};
-use super::super::{Float, Int, IntTy, MinInt};
+use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
 
 #[inline]
 pub fn floor<F: Float>(x: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fmax.rs b/library/compiler-builtins/libm/src/math/generic/fmax.rs
index bf3f847e89b..54207e4b328 100644
--- a/library/compiler-builtins/libm/src/math/generic/fmax.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fmax.rs
@@ -14,7 +14,7 @@
 //!
 //! [link]: https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
 
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fmax<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fmaximum.rs b/library/compiler-builtins/libm/src/math/generic/fmaximum.rs
index 387055af29c..4b6295bc0c6 100644
--- a/library/compiler-builtins/libm/src/math/generic/fmaximum.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fmaximum.rs
@@ -9,7 +9,7 @@
 //!
 //! Excluded from our implementation is sNaN handling.
 
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fmaximum<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fmaximum_num.rs b/library/compiler-builtins/libm/src/math/generic/fmaximum_num.rs
index f7efdde80ea..2e97ff6d369 100644
--- a/library/compiler-builtins/libm/src/math/generic/fmaximum_num.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fmaximum_num.rs
@@ -11,7 +11,7 @@
 //!
 //! Excluded from our implementation is sNaN handling.
 
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fmaximum_num<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fmin.rs b/library/compiler-builtins/libm/src/math/generic/fmin.rs
index cd3caeee4f2..0f86364d230 100644
--- a/library/compiler-builtins/libm/src/math/generic/fmin.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fmin.rs
@@ -14,7 +14,7 @@
 //!
 //! [link]: https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
 
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fmin<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fminimum.rs b/library/compiler-builtins/libm/src/math/generic/fminimum.rs
index 4ddb3645506..9dc0b64be3f 100644
--- a/library/compiler-builtins/libm/src/math/generic/fminimum.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fminimum.rs
@@ -9,7 +9,7 @@
 //!
 //! Excluded from our implementation is sNaN handling.
 
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fminimum<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fminimum_num.rs b/library/compiler-builtins/libm/src/math/generic/fminimum_num.rs
index 441c204a921..40db8b18957 100644
--- a/library/compiler-builtins/libm/src/math/generic/fminimum_num.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fminimum_num.rs
@@ -11,7 +11,7 @@
 //!
 //! Excluded from our implementation is sNaN handling.
 
-use super::super::Float;
+use crate::support::Float;
 
 #[inline]
 pub fn fminimum_num<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/fmod.rs b/library/compiler-builtins/libm/src/math/generic/fmod.rs
index e9898012fcc..29acc8a4d5d 100644
--- a/library/compiler-builtins/libm/src/math/generic/fmod.rs
+++ b/library/compiler-builtins/libm/src/math/generic/fmod.rs
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: MIT OR Apache-2.0 */
-use super::super::{CastFrom, Float, Int, MinInt};
+use crate::support::{CastFrom, Float, Int, MinInt};
 
 #[inline]
 pub fn fmod<F: Float>(x: F, y: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/rint.rs b/library/compiler-builtins/libm/src/math/generic/rint.rs
index 7bf38e3235c..c5bc27d3de6 100644
--- a/library/compiler-builtins/libm/src/math/generic/rint.rs
+++ b/library/compiler-builtins/libm/src/math/generic/rint.rs
@@ -1,8 +1,7 @@
 /* SPDX-License-Identifier: MIT */
 /* origin: musl src/math/rint.c */
 
-use super::super::Float;
-use super::super::support::{FpResult, Round};
+use crate::support::{Float, FpResult, Round};
 
 /// IEEE 754-2019 `roundToIntegralExact`, which respects rounding mode and raises inexact if
 /// applicable.
diff --git a/library/compiler-builtins/libm/src/math/generic/round.rs b/library/compiler-builtins/libm/src/math/generic/round.rs
index 01314ac70c2..16739f01d87 100644
--- a/library/compiler-builtins/libm/src/math/generic/round.rs
+++ b/library/compiler-builtins/libm/src/math/generic/round.rs
@@ -1,5 +1,5 @@
-use super::super::{Float, MinInt};
 use super::{copysign, trunc};
+use crate::support::{Float, MinInt};
 
 #[inline]
 pub fn round<F: Float>(x: F) -> F {
diff --git a/library/compiler-builtins/libm/src/math/generic/scalbn.rs b/library/compiler-builtins/libm/src/math/generic/scalbn.rs
index a45db1b4a02..6dd9b1a9b84 100644
--- a/library/compiler-builtins/libm/src/math/generic/scalbn.rs
+++ b/library/compiler-builtins/libm/src/math/generic/scalbn.rs
@@ -1,4 +1,4 @@
-use super::super::{CastFrom, CastInto, Float, IntTy, MinInt};
+use crate::support::{CastFrom, CastInto, Float, IntTy, MinInt};
 
 /// Scale the exponent.
 ///
diff --git a/library/compiler-builtins/libm/src/math/generic/sqrt.rs b/library/compiler-builtins/libm/src/math/generic/sqrt.rs
index c52560bdb2c..9481c4cdb7b 100644
--- a/library/compiler-builtins/libm/src/math/generic/sqrt.rs
+++ b/library/compiler-builtins/libm/src/math/generic/sqrt.rs
@@ -41,8 +41,9 @@
 //! Goldschmidt has the advantage over Newton-Raphson that `sqrt(x)` and `1/sqrt(x)` are
 //! computed at the same time, i.e. there is no need to calculate `1/sqrt(x)` and invert it.
 
-use super::super::support::{FpResult, IntTy, Round, Status, cold_path};
-use super::super::{CastFrom, CastInto, DInt, Float, HInt, Int, MinInt};
+use crate::support::{
+    CastFrom, CastInto, DInt, Float, FpResult, HInt, Int, IntTy, MinInt, Round, Status, cold_path,
+};
 
 #[inline]
 pub fn sqrt<F>(x: F) -> F
diff --git a/library/compiler-builtins/libm/src/math/generic/trunc.rs b/library/compiler-builtins/libm/src/math/generic/trunc.rs
index 29a28f47b63..d5b444d15df 100644
--- a/library/compiler-builtins/libm/src/math/generic/trunc.rs
+++ b/library/compiler-builtins/libm/src/math/generic/trunc.rs
@@ -1,8 +1,7 @@
 /* SPDX-License-Identifier: MIT
  * origin: musl src/math/trunc.c */
 
-use super::super::support::{FpResult, Status};
-use super::super::{Float, Int, IntTy, MinInt};
+use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
 
 #[inline]
 pub fn trunc<F: Float>(x: F) -> F {