Skip to content

Replace super::super with crate::support where possible #907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ci/ci-util.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ def emit_workflow_output(self):
if error_on_many_tests and total_to_test > MANY_EXTENSIVE_THRESHOLD:
eprint(
f"More than {MANY_EXTENSIVE_THRESHOLD} tests would be run; add"
f" `{ALLOW_MANY_EXTENSIVE_DIRECTIVE}` to the PR body if this is intentional"
f" `{ALLOW_MANY_EXTENSIVE_DIRECTIVE}` to the PR body if this is"
" intentional. If this is refactoring that happens to touch a lot of"
f" files, `{SKIP_EXTENSIVE_DIRECTIVE}` can be used instead."
)
exit(1)

Expand Down
3 changes: 1 addition & 2 deletions libm/src/math/generic/ceil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/copysign.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::Float;
use crate::support::Float;

/// Copy the sign of `y` to `x`.
#[inline]
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fabs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::Float;
use crate::support::Float;

/// Absolute value.
#[inline]
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fdim.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::Float;
use crate::support::Float;

#[inline]
pub fn fdim<F: Float>(x: F, y: F) -> F {
Expand Down
3 changes: 1 addition & 2 deletions libm/src/math/generic/floor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fmax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fmaximum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fmaximum_num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fmin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fminimum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fminimum_num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/fmod.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions libm/src/math/generic/rint.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/round.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libm/src/math/generic/scalbn.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::super::{CastFrom, CastInto, Float, IntTy, MinInt};
use crate::support::{CastFrom, CastInto, Float, IntTy, MinInt};

/// Scale the exponent.
///
Expand Down
5 changes: 3 additions & 2 deletions libm/src/math/generic/sqrt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions libm/src/math/generic/trunc.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down