Skip to content

Commit 6ce258f

Browse files
committed
Remove extern crate rustc_macros from rustc_middle.
1 parent 4814fd0 commit 6ce258f

Some content is hidden

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

71 files changed

+80
-28
lines changed

compiler/rustc_middle/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::fmt;
22

33
use rustc_errors::{codes::*, DiagArgName, DiagArgValue, DiagMessage};
4-
use rustc_macros::Diagnostic;
4+
use rustc_macros::{Diagnostic, Subdiagnostic};
55
use rustc_span::{Span, Symbol};
66

77
use crate::ty::Ty;

compiler/rustc_middle/src/hir/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use rustc_data_structures::sync::{try_par_for_each_in, DynSend, DynSync};
1515
use rustc_hir::def::DefKind;
1616
use rustc_hir::def_id::{DefId, LocalDefId, LocalModDefId};
1717
use rustc_hir::*;
18+
use rustc_macros::{Decodable, Encodable, HashStable};
1819
use rustc_span::{ErrorGuaranteed, ExpnId};
1920

2021
/// Gather the LocalDefId for each item-like within a module, including items contained within

compiler/rustc_middle/src/hir/place.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use crate::ty;
22
use crate::ty::Ty;
33

44
use rustc_hir::HirId;
5+
use rustc_macros::{HashStable, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable};
56
use rustc_target::abi::{FieldIdx, VariantIdx};
67

78
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, TyEncodable, TyDecodable, HashStable)]

compiler/rustc_middle/src/infer/canonical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
use rustc_data_structures::fx::FxHashMap;
2525
use rustc_data_structures::sync::Lock;
26-
use rustc_macros::HashStable;
26+
use rustc_macros::{HashStable, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable};
2727
use rustc_type_ir::Canonical as IrCanonical;
2828
use rustc_type_ir::CanonicalVarInfo as IrCanonicalVarInfo;
2929
pub use rustc_type_ir::{CanonicalTyVarKind, CanonicalVarKind};

compiler/rustc_middle/src/infer/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub mod unify_key;
44
use crate::ty::Region;
55
use crate::ty::{OpaqueTypeKey, Ty};
66
use rustc_data_structures::sync::Lrc;
7+
use rustc_macros::{HashStable, TypeFoldable, TypeVisitable};
78
use rustc_span::Span;
89

910
/// Requires that `region` must be equal to one of the regions in `choice_regions`.

compiler/rustc_middle/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
#[macro_use]
6969
extern crate bitflags;
7070
#[macro_use]
71-
extern crate rustc_macros;
72-
#[macro_use]
7371
extern crate rustc_data_structures;
7472
#[macro_use]
7573
extern crate tracing;

compiler/rustc_middle/src/lint.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use rustc_data_structures::fx::FxIndexMap;
44
use rustc_data_structures::sorted_map::SortedMap;
55
use rustc_errors::{Diag, DiagMessage, MultiSpan};
66
use rustc_hir::{HirId, ItemLocalId};
7+
use rustc_macros::HashStable;
78
use rustc_session::lint::{
89
builtin::{self, FORBIDDEN_LINT_GROUPS},
910
FutureIncompatibilityReason, Level, Lint, LintId,

compiler/rustc_middle/src/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::ty;
22

33
use rustc_hir::def::Res;
4-
use rustc_macros::HashStable;
4+
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
55
use rustc_span::def_id::DefId;
66
use rustc_span::symbol::Ident;
77
use smallvec::SmallVec;

compiler/rustc_middle/src/middle/codegen_fn_attrs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::mir::mono::Linkage;
22
use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr};
3+
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
34
use rustc_span::symbol::Symbol;
45
use rustc_target::abi::Align;
56
use rustc_target::spec::SanitizerSet;

compiler/rustc_middle/src/middle/debugger_visualizer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use rustc_data_structures::sync::Lrc;
2+
use rustc_macros::{Decodable, Encodable, HashStable};
23
use std::path::PathBuf;
34

45
#[derive(HashStable)]

0 commit comments

Comments
 (0)