about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-29 02:43:41 +0000
committerbors <bors@rust-lang.org>2024-07-29 02:43:41 +0000
commit2e630267b2bce50af3258ce4817e377fa09c145b (patch)
tree29006db815bf547dfd0129910b23b8c54675bd98 /library/core/src/array
parent2cbbe8b8bb2be672b14cf741a2f0ec24a49f3f0b (diff)
parent84ac80f1921afc243d71fd0caaa4f2838c294102 (diff)
downloadrust-2e630267b2bce50af3258ce4817e377fa09c145b.tar.gz
rust-2e630267b2bce50af3258ce4817e377fa09c145b.zip
Auto merge of #125443 - nnethercote:rustfmt-use-decls, r=lcnr,cuviper,GuillaumeGomez
rustfmt `use` declarations

This PR implements https://github.com/rust-lang/compiler-team/issues/750, which changes how `use` declarations are formatted by adding these options to `rustfmt.toml`:
```
group_imports = "StdExternalCrate"
imports_granularity = "Module"
```

r? `@ghost`
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/iter.rs13
-rw-r--r--library/core/src/array/mod.rs1
2 files changed, 5 insertions, 9 deletions
diff --git a/library/core/src/array/iter.rs b/library/core/src/array/iter.rs
index 617fd627c92..2d19e4876f6 100644
--- a/library/core/src/array/iter.rs
+++ b/library/core/src/array/iter.rs
@@ -1,14 +1,11 @@
 //! Defines the `IntoIter` owned iterator for arrays.
 
+use crate::intrinsics::transmute_unchecked;
+use crate::iter::{self, FusedIterator, TrustedLen, TrustedRandomAccessNoCoerce};
+use crate::mem::MaybeUninit;
 use crate::num::NonZero;
-use crate::{
-    fmt,
-    intrinsics::transmute_unchecked,
-    iter::{self, FusedIterator, TrustedLen, TrustedRandomAccessNoCoerce},
-    mem::MaybeUninit,
-    ops::{IndexRange, Range},
-    ptr,
-};
+use crate::ops::{IndexRange, Range};
+use crate::{fmt, ptr};
 
 /// A by-value [array] iterator.
 #[stable(feature = "array_value_iter", since = "1.51.0")]
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 8285c64ed29..5c826b9993f 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -23,7 +23,6 @@ mod equality;
 mod iter;
 
 pub(crate) use drain::drain_array_with;
-
 #[stable(feature = "array_value_iter", since = "1.51.0")]
 pub use iter::IntoIter;