about summary refs log tree commit diff
path: root/compiler/rustc_index/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-07-29 08:13:50 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2024-07-29 08:26:52 +1000
commit84ac80f1921afc243d71fd0caaa4f2838c294102 (patch)
tree29006db815bf547dfd0129910b23b8c54675bd98 /compiler/rustc_index/src
parent118f9350c5b902e462a6dcc4325670f3da701600 (diff)
downloadrust-84ac80f1921afc243d71fd0caaa4f2838c294102.tar.gz
rust-84ac80f1921afc243d71fd0caaa4f2838c294102.zip
Reformat `use` declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
Diffstat (limited to 'compiler/rustc_index/src')
-rw-r--r--compiler/rustc_index/src/bit_set.rs11
-rw-r--r--compiler/rustc_index/src/bit_set/tests.rs1
-rw-r--r--compiler/rustc_index/src/interval.rs3
-rw-r--r--compiler/rustc_index/src/lib.rs5
-rw-r--r--compiler/rustc_index/src/slice.rs9
-rw-r--r--compiler/rustc_index/src/vec.rs10
6 files changed, 15 insertions, 24 deletions
diff --git a/compiler/rustc_index/src/bit_set.rs b/compiler/rustc_index/src/bit_set.rs
index e37af6610dd..506afbae40c 100644
--- a/compiler/rustc_index/src/bit_set.rs
+++ b/compiler/rustc_index/src/bit_set.rs
@@ -1,21 +1,16 @@
-use std::fmt;
-use std::iter;
 use std::marker::PhantomData;
-use std::mem;
 use std::ops::{BitAnd, BitAndAssign, BitOrAssign, Bound, Not, Range, RangeBounds, Shl};
 use std::rc::Rc;
-use std::slice;
+use std::{fmt, iter, mem, slice};
 
 use arrayvec::ArrayVec;
-use smallvec::{smallvec, SmallVec};
-
 #[cfg(feature = "nightly")]
 use rustc_macros::{Decodable_Generic, Encodable_Generic};
+use smallvec::{smallvec, SmallVec};
+use Chunk::*;
 
 use crate::{Idx, IndexVec};
 
-use Chunk::*;
-
 #[cfg(test)]
 mod tests;
 
diff --git a/compiler/rustc_index/src/bit_set/tests.rs b/compiler/rustc_index/src/bit_set/tests.rs
index 351d62feed9..066aa46e350 100644
--- a/compiler/rustc_index/src/bit_set/tests.rs
+++ b/compiler/rustc_index/src/bit_set/tests.rs
@@ -2,6 +2,7 @@ use super::*;
 
 extern crate test;
 use std::hint::black_box;
+
 use test::Bencher;
 
 #[test]
diff --git a/compiler/rustc_index/src/interval.rs b/compiler/rustc_index/src/interval.rs
index 0c1180b3e98..be028feca60 100644
--- a/compiler/rustc_index/src/interval.rs
+++ b/compiler/rustc_index/src/interval.rs
@@ -1,7 +1,6 @@
 use std::iter::Step;
 use std::marker::PhantomData;
-use std::ops::RangeBounds;
-use std::ops::{Bound, Range};
+use std::ops::{Bound, Range, RangeBounds};
 
 use smallvec::SmallVec;
 
diff --git a/compiler/rustc_index/src/lib.rs b/compiler/rustc_index/src/lib.rs
index b775ae1f5e9..b5e4f02a8d1 100644
--- a/compiler/rustc_index/src/lib.rs
+++ b/compiler/rustc_index/src/lib.rs
@@ -12,9 +12,10 @@ mod idx;
 mod slice;
 mod vec;
 
-pub use {idx::Idx, slice::IndexSlice, vec::IndexVec};
-
+pub use idx::Idx;
 pub use rustc_index_macros::newtype_index;
+pub use slice::IndexSlice;
+pub use vec::IndexVec;
 
 /// Type size assertion. The first argument is a type and the second argument is its expected size.
 ///
diff --git a/compiler/rustc_index/src/slice.rs b/compiler/rustc_index/src/slice.rs
index 0663c7247de..3205ca3f40b 100644
--- a/compiler/rustc_index/src/slice.rs
+++ b/compiler/rustc_index/src/slice.rs
@@ -1,9 +1,6 @@
-use std::{
-    fmt,
-    marker::PhantomData,
-    ops::{Index, IndexMut},
-    slice,
-};
+use std::marker::PhantomData;
+use std::ops::{Index, IndexMut};
+use std::{fmt, slice};
 
 use crate::{Idx, IndexVec};
 
diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs
index 346ce945bf9..7438c97eb58 100644
--- a/compiler/rustc_index/src/vec.rs
+++ b/compiler/rustc_index/src/vec.rs
@@ -1,13 +1,11 @@
-#[cfg(feature = "nightly")]
-use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
-
 use std::borrow::{Borrow, BorrowMut};
-use std::fmt;
 use std::hash::Hash;
 use std::marker::PhantomData;
 use std::ops::{Deref, DerefMut, RangeBounds};
-use std::slice;
-use std::vec;
+use std::{fmt, slice, vec};
+
+#[cfg(feature = "nightly")]
+use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
 
 use crate::{Idx, IndexSlice};