Skip to content

Commit 10a7abf

Browse files
committed
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.
1 parent 8e78411 commit 10a7abf

16 files changed

+18
-21
lines changed

libm/src/math/generic/ceil.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
//! performance seems to be better (based on icount) and it does not seem to experience rounding
88
//! errors on i386.
99
10-
use super::super::support::{FpResult, Status};
11-
use super::super::{Float, Int, IntTy, MinInt};
10+
use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
1211

1312
#[inline]
1413
pub fn ceil<F: Float>(x: F) -> F {

libm/src/math/generic/copysign.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::super::Float;
1+
use crate::support::Float;
22

33
/// Copy the sign of `y` to `x`.
44
#[inline]

libm/src/math/generic/fabs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::super::Float;
1+
use crate::support::Float;
22

33
/// Absolute value.
44
#[inline]

libm/src/math/generic/fdim.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::super::Float;
1+
use crate::support::Float;
22

33
#[inline]
44
pub fn fdim<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/floor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
//! performance seems to be better (based on icount) and it does not seem to experience rounding
88
//! errors on i386.
99
10-
use super::super::support::{FpResult, Status};
11-
use super::super::{Float, Int, IntTy, MinInt};
10+
use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
1211

1312
#[inline]
1413
pub fn floor<F: Float>(x: F) -> F {

libm/src/math/generic/fmax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! [link]: https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
1616
17-
use super::super::Float;
17+
use crate::support::Float;
1818

1919
#[inline]
2020
pub fn fmax<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/fmaximum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//!
1010
//! Excluded from our implementation is sNaN handling.
1111
12-
use super::super::Float;
12+
use crate::support::Float;
1313

1414
#[inline]
1515
pub fn fmaximum<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/fmaximum_num.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//!
1212
//! Excluded from our implementation is sNaN handling.
1313
14-
use super::super::Float;
14+
use crate::support::Float;
1515

1616
#[inline]
1717
pub fn fmaximum_num<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/fmin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! [link]: https://grouper.ieee.org/groups/msc/ANSI_IEEE-Std-754-2019/background/minNum_maxNum_Removal_Demotion_v3.pdf
1616
17-
use super::super::Float;
17+
use crate::support::Float;
1818

1919
#[inline]
2020
pub fn fmin<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/fminimum_num.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//!
1212
//! Excluded from our implementation is sNaN handling.
1313
14-
use super::super::Float;
14+
use crate::support::Float;
1515

1616
#[inline]
1717
pub fn fminimum_num<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/fmod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* SPDX-License-Identifier: MIT OR Apache-2.0 */
2-
use super::super::{CastFrom, Float, Int, MinInt};
2+
use crate::support::{CastFrom, Float, Int, MinInt};
33

44
#[inline]
55
pub fn fmod<F: Float>(x: F, y: F) -> F {

libm/src/math/generic/rint.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/* SPDX-License-Identifier: MIT */
22
/* origin: musl src/math/rint.c */
33

4-
use super::super::Float;
5-
use super::super::support::{FpResult, Round};
4+
use crate::support::{Float, FpResult, Round};
65

76
/// IEEE 754-2019 `roundToIntegralExact`, which respects rounding mode and raises inexact if
87
/// applicable.

libm/src/math/generic/round.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use super::super::{Float, MinInt};
21
use super::{copysign, trunc};
2+
use crate::support::{Float, MinInt};
33

44
#[inline]
55
pub fn round<F: Float>(x: F) -> F {

libm/src/math/generic/scalbn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::super::{CastFrom, CastInto, Float, IntTy, MinInt};
1+
use crate::support::{CastFrom, CastInto, Float, IntTy, MinInt};
22

33
/// Scale the exponent.
44
///

libm/src/math/generic/sqrt.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
//! Goldschmidt has the advantage over Newton-Raphson that `sqrt(x)` and `1/sqrt(x)` are
4242
//! computed at the same time, i.e. there is no need to calculate `1/sqrt(x)` and invert it.
4343
44-
use super::super::support::{FpResult, IntTy, Round, Status, cold_path};
45-
use super::super::{CastFrom, CastInto, DInt, Float, HInt, Int, MinInt};
44+
use crate::support::{
45+
CastFrom, CastInto, DInt, Float, FpResult, HInt, Int, IntTy, MinInt, Round, Status, cold_path,
46+
};
4647

4748
#[inline]
4849
pub fn sqrt<F>(x: F) -> F

libm/src/math/generic/trunc.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/* SPDX-License-Identifier: MIT
22
* origin: musl src/math/trunc.c */
33

4-
use super::super::support::{FpResult, Status};
5-
use super::super::{Float, Int, IntTy, MinInt};
4+
use crate::support::{Float, FpResult, Int, IntTy, MinInt, Status};
65

76
#[inline]
87
pub fn trunc<F: Float>(x: F) -> F {

0 commit comments

Comments
 (0)