about summary refs log tree commit diff
path: root/compiler/rustc_data_structures
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-04-30 15:04:08 +0200
committerGitHub <noreply@github.com>2024-04-30 15:04:08 +0200
commit784316eadca2c58f6d79343e1eac6a7b667c8ea3 (patch)
tree84c0ff52d026d87f322874cfdde1f04dd8470e62 /compiler/rustc_data_structures
parent7427812261469c52f7093722746c26b134d39bd0 (diff)
parent2088de28896b7699154aecb31e0e2664a18432ba (diff)
downloadrust-784316eadca2c58f6d79343e1eac6a7b667c8ea3.tar.gz
rust-784316eadca2c58f6d79343e1eac6a7b667c8ea3.zip
Rollup merge of #124511 - nnethercote:rm-extern-crates, r=fee1-dead
Remove many `#[macro_use] extern crate foo` items

This requires the addition of more `use` items, which often make the code more verbose. But they also make the code easier to read, because `#[macro_use]` obscures where macros are defined.

r? `@fee1-dead`
Diffstat (limited to 'compiler/rustc_data_structures')
-rw-r--r--compiler/rustc_data_structures/src/lib.rs2
-rw-r--r--compiler/rustc_data_structures/src/sorted_map.rs1
-rw-r--r--compiler/rustc_data_structures/src/svh.rs4
-rw-r--r--compiler/rustc_data_structures/src/unord.rs1
4 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs
index 2b799d6f5d3..495c1977df9 100644
--- a/compiler/rustc_data_structures/src/lib.rs
+++ b/compiler/rustc_data_structures/src/lib.rs
@@ -41,8 +41,6 @@
 
 #[macro_use]
 extern crate tracing;
-#[macro_use]
-extern crate rustc_macros;
 
 use std::fmt;
 
diff --git a/compiler/rustc_data_structures/src/sorted_map.rs b/compiler/rustc_data_structures/src/sorted_map.rs
index 1436628139f..21d7c91ec48 100644
--- a/compiler/rustc_data_structures/src/sorted_map.rs
+++ b/compiler/rustc_data_structures/src/sorted_map.rs
@@ -1,4 +1,5 @@
 use crate::stable_hasher::{HashStable, StableHasher, StableOrd};
+use rustc_macros::{Decodable_Generic, Encodable_Generic};
 use std::borrow::Borrow;
 use std::fmt::Debug;
 use std::mem;
diff --git a/compiler/rustc_data_structures/src/svh.rs b/compiler/rustc_data_structures/src/svh.rs
index 1cfc9fecd47..38629ea9801 100644
--- a/compiler/rustc_data_structures/src/svh.rs
+++ b/compiler/rustc_data_structures/src/svh.rs
@@ -6,9 +6,9 @@
 //! compiled from distinct sources.
 
 use crate::fingerprint::Fingerprint;
-use std::fmt;
-
 use crate::stable_hasher;
+use rustc_macros::{Decodable_Generic, Encodable_Generic};
+use std::fmt;
 
 #[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable_Generic, Decodable_Generic, Hash)]
 pub struct Svh {
diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs
index a99e2062039..ca66d58c139 100644
--- a/compiler/rustc_data_structures/src/unord.rs
+++ b/compiler/rustc_data_structures/src/unord.rs
@@ -3,6 +3,7 @@
 //! as required by the query system.
 
 use rustc_hash::{FxHashMap, FxHashSet};
+use rustc_macros::{Decodable_Generic, Encodable_Generic};
 use std::{
     borrow::{Borrow, BorrowMut},
     collections::hash_map::Entry,