Remove extern crate rustc_macros from rustc_middle.

This commit is contained in:
Nicholas Nethercote
2024-04-29 11:14:55 +10:00
parent 4814fd0a4b
commit 6ce258f657
71 changed files with 80 additions and 28 deletions

View File

@@ -1,5 +1,6 @@
use crate::mir::mono::Linkage;
use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr};
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
use rustc_span::symbol::Symbol;
use rustc_target::abi::Align;
use rustc_target::spec::SanitizerSet;

View File

@@ -1,4 +1,5 @@
use rustc_data_structures::sync::Lrc;
use rustc_macros::{Decodable, Encodable, HashStable};
use std::path::PathBuf;
#[derive(HashStable)]

View File

@@ -4,6 +4,7 @@
//! For all the gory details, see the provider of the `dependency_formats`
//! query.
use rustc_macros::{Decodable, Encodable, HashStable};
use rustc_session::config::CrateType;
/// A list of dependencies for a certain crate type.

View File

@@ -1,7 +1,7 @@
use crate::ty::GenericArgsRef;
use crate::ty::{self, Ty, TyCtxt};
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
use rustc_macros::HashStable;
use rustc_macros::{Decodable, Encodable, HashStable, TyDecodable, TyEncodable};
/// The SymbolExportLevel of a symbols specifies from which kinds of crates
/// the symbol will be exported. `C` symbols will be exported from any

View File

@@ -5,6 +5,7 @@ pub mod exported_symbols;
pub mod lang_items;
pub mod lib_features {
use rustc_data_structures::unord::UnordMap;
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
use rustc_span::{symbol::Symbol, Span};
#[derive(Copy, Clone, Debug, PartialEq, Eq)]

View File

@@ -11,7 +11,7 @@ use rustc_data_structures::fx::FxIndexMap;
use rustc_data_structures::unord::UnordMap;
use rustc_hir as hir;
use rustc_hir::{HirId, HirIdMap, Node};
use rustc_macros::HashStable;
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
use rustc_span::{Span, DUMMY_SP};
use std::fmt;

View File

@@ -6,7 +6,7 @@ use rustc_data_structures::fx::FxIndexMap;
use rustc_errors::ErrorGuaranteed;
use rustc_hir::def_id::DefId;
use rustc_hir::{ItemLocalId, OwnerId};
use rustc_macros::HashStable;
use rustc_macros::{Decodable, Encodable, HashStable, TyDecodable, TyEncodable};
#[derive(Clone, Copy, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, HashStable)]
pub enum ResolvedArg {

View File

@@ -14,6 +14,7 @@ use rustc_feature::GateIssue;
use rustc_hir::def::DefKind;
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdMap};
use rustc_hir::{self as hir, HirId};
use rustc_macros::{Decodable, Encodable, HashStable};
use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_session::lint::builtin::{DEPRECATED, DEPRECATED_IN_FUTURE, SOFT_UNSTABLE};
use rustc_session::lint::{BuiltinLintDiag, Level, Lint, LintBuffer};