Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2e63026

Browse files
committedJul 29, 2024
Auto merge of #125443 - nnethercote:rustfmt-use-decls, r=lcnr,cuviper,GuillaumeGomez
rustfmt `use` declarations This PR implements rust-lang/compiler-team#750, which changes how `use` declarations are formatted by adding these options to `rustfmt.toml`: ``` group_imports = "StdExternalCrate" imports_granularity = "Module" ``` r? `@ghost`
2 parents 2cbbe8b + 84ac80f commit 2e63026

File tree

1,867 files changed

+8167
-8995
lines changed

Some content is hidden

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

1,867 files changed

+8167
-8995
lines changed
 

‎compiler/rustc_abi/src/layout.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use std::borrow::{Borrow, Cow};
2-
use std::cmp;
32
use std::fmt::{self, Write};
4-
use std::iter;
5-
use std::ops::Bound;
6-
use std::ops::Deref;
3+
use std::ops::{Bound, Deref};
4+
use std::{cmp, iter};
75

86
use rustc_index::Idx;
97
use tracing::debug;
@@ -982,7 +980,8 @@ fn univariant<
982980
if repr.can_randomize_type_layout() && cfg!(feature = "randomize") {
983981
#[cfg(feature = "randomize")]
984982
{
985-
use rand::{seq::SliceRandom, SeedableRng};
983+
use rand::seq::SliceRandom;
984+
use rand::SeedableRng;
986985
// `ReprOptions.field_shuffle_seed` is a deterministic seed we can use to randomize field
987986
// ordering.
988987
let mut rng =

‎compiler/rustc_abi/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@
66
// tidy-alphabetical-end
77

88
use std::fmt;
9+
#[cfg(feature = "nightly")]
10+
use std::iter::Step;
911
use std::num::{NonZeroUsize, ParseIntError};
1012
use std::ops::{Add, AddAssign, Mul, RangeInclusive, Sub};
1113
use std::str::FromStr;
1214

1315
use bitflags::bitflags;
14-
use rustc_index::{Idx, IndexSlice, IndexVec};
15-
1616
#[cfg(feature = "nightly")]
1717
use rustc_data_structures::stable_hasher::StableOrd;
18+
use rustc_index::{Idx, IndexSlice, IndexVec};
1819
#[cfg(feature = "nightly")]
1920
use rustc_macros::HashStable_Generic;
2021
#[cfg(feature = "nightly")]
2122
use rustc_macros::{Decodable_Generic, Encodable_Generic};
22-
#[cfg(feature = "nightly")]
23-
use std::iter::Step;
2423

2524
mod layout;
2625
#[cfg(test)]

0 commit comments

Comments
 (0)
Please sign in to comment.