about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-04 17:57:38 +0000
committerbors <bors@rust-lang.org>2024-03-04 17:57:38 +0000
commit790287a08fa4576c8518492212aaae8502c1e237 (patch)
tree9a4f2409b2b9cb7a19c6f6b5520d71af99467e6f
parent4fdb2152d96178753dea175b1735a541bbf013a7 (diff)
parent45d955edb0784c59e0b059d7ef5325c334edc3a4 (diff)
downloadrust-790287a08fa4576c8518492212aaae8502c1e237.tar.gz
rust-790287a08fa4576c8518492212aaae8502c1e237.zip
Auto merge of #3357 - RalfJung:imports, r=RalfJung
reorder rustc crate imports a bit
-rw-r--r--src/tools/miri/src/bin/miri.rs7
-rw-r--r--src/tools/miri/src/lib.rs13
2 files changed, 12 insertions, 8 deletions
diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs
index a101b4a29a9..69ea9e5fad9 100644
--- a/src/tools/miri/src/bin/miri.rs
+++ b/src/tools/miri/src/bin/miri.rs
@@ -8,6 +8,11 @@
     rustc::untranslatable_diagnostic
 )]
 
+// Some "regular" crates we want to share with rustc
+#[macro_use]
+extern crate tracing;
+
+// The rustc crates we need
 extern crate rustc_data_structures;
 extern crate rustc_driver;
 extern crate rustc_hir;
@@ -16,8 +21,6 @@ extern crate rustc_log;
 extern crate rustc_metadata;
 extern crate rustc_middle;
 extern crate rustc_session;
-#[macro_use]
-extern crate tracing;
 
 use std::env::{self, VarError};
 use std::num::NonZero;
diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs
index c0d1afa8023..c3bd6b912d5 100644
--- a/src/tools/miri/src/lib.rs
+++ b/src/tools/miri/src/lib.rs
@@ -49,8 +49,12 @@
 // Needed for rustdoc from bootstrap (with `-Znormalize-docs`).
 #![recursion_limit = "256"]
 
-extern crate either; // the one from rustc
+// Some "regular" crates we want to share with rustc
+extern crate either;
+#[macro_use]
+extern crate tracing;
 
+// The rustc crates we need
 extern crate rustc_apfloat;
 extern crate rustc_ast;
 extern crate rustc_const_eval;
@@ -63,11 +67,8 @@ extern crate rustc_middle;
 extern crate rustc_session;
 extern crate rustc_span;
 extern crate rustc_target;
-#[macro_use]
-extern crate tracing;
-
-// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
-// files.
+// Linking `rustc_driver` pulls in the required  object code as the rest of the rustc crates are
+// shipped only as rmeta files.
 #[allow(unused_extern_crates)]
 extern crate rustc_driver;