Skip to content

Commit 40688f6

Browse files
committed
Run cargo fmt on all projects
Apply the same formatting rules to both `libm` and `compiler-builtins`.
1 parent 0bd4d0a commit 40688f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1070
-283
lines changed

builtins-test-intrinsics/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ mod intrinsics {
480480

481481
fn run() {
482482
use core::hint::black_box as bb;
483+
483484
use intrinsics::*;
484485

485486
// FIXME(f16_f128): some PPC f128 <-> int conversion functions have the wrong names

builtins-test/benches/float_cmp.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#![cfg_attr(f128_enabled, feature(f128))]
22

33
use builtins_test::float_bench;
4-
use criterion::{Criterion, criterion_main};
5-
64
use compiler_builtins::float::cmp;
5+
use criterion::{Criterion, criterion_main};
76

87
/// `gt` symbols are allowed to return differing results, they just get compared
98
/// to 0.

builtins-test/benches/mem_icount.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,10 @@ mod mcmp {
239239
}
240240

241241
mod mmove {
242-
use super::*;
243242
use Spread::{Aligned, Large, Medium, Small};
244243

244+
use super::*;
245+
245246
struct Cfg {
246247
len: usize,
247248
spread: Spread,

builtins-test/src/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
use alloc::vec::Vec;
12
use core::cell::RefCell;
23

3-
use alloc::vec::Vec;
44
use compiler_builtins::float::Float;
55

66
/// Fuzz with these many items to ensure equal functions

builtins-test/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ extern crate alloc;
2121

2222
use compiler_builtins::float::Float;
2323
use compiler_builtins::int::{Int, MinInt};
24-
2524
use rand_xoshiro::Xoshiro128StarStar;
2625
use rand_xoshiro::rand_core::{RngCore, SeedableRng};
2726

builtins-test/tests/cmp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ mod float_comparisons {
9797
__eqkf2 as __eqtf2, __gekf2 as __getf2, __gtkf2 as __gttf2, __lekf2 as __letf2,
9898
__ltkf2 as __lttf2, __nekf2 as __netf2, __unordkf2 as __unordtf2,
9999
};
100-
101100
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
102101
use compiler_builtins::float::cmp::{
103102
__eqtf2, __getf2, __gttf2, __letf2, __lttf2, __netf2, __unordtf2,

builtins-test/tests/div_rem.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#![feature(f128)]
22
#![allow(unused_macros)]
33

4+
use builtins_test::*;
45
use compiler_builtins::int::sdiv::{__divmoddi4, __divmodsi4, __divmodti4};
56
use compiler_builtins::int::udiv::{__udivmoddi4, __udivmodsi4, __udivmodti4, u128_divide_sparc};
67

7-
use builtins_test::*;
8-
98
// Division algorithms have by far the nastiest and largest number of edge cases, and experience shows
109
// that sometimes 100_000 iterations of the random fuzzer is needed.
1110

compiler-builtins/build.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
mod configure;
22

3-
use std::{collections::BTreeMap, env, path::PathBuf, sync::atomic::Ordering};
3+
use std::collections::BTreeMap;
4+
use std::env;
5+
use std::path::PathBuf;
6+
use std::sync::atomic::Ordering;
47

5-
use configure::{configure_aliases, configure_f16_f128, Target};
8+
use configure::{Target, configure_aliases, configure_f16_f128};
69

710
fn main() {
811
println!("cargo::rerun-if-changed=build.rs");

compiler-builtins/src/arm_linux.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use core::arch;
2-
use core::mem;
31
use core::sync::atomic::{AtomicU32, Ordering};
2+
use core::{arch, mem};
43

54
// Kernel-provided user-mode helper functions:
65
// https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt

compiler-builtins/src/float/conv.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use core::ops::Neg;
22

3-
use crate::int::{CastFrom, CastInto, Int, MinInt};
4-
53
use super::Float;
4+
use crate::int::{CastFrom, CastInto, Int, MinInt};
65

76
/// Conversions from integers to floats.
87
///

0 commit comments

Comments
 (0)