compiler: remove rustc_target::spec::abi reexports
This commit is contained in:
parent
ca193471b5
commit
54ff6e0ad5
8 changed files with 13 additions and 14 deletions
|
@ -3702,6 +3702,7 @@ version = "0.0.0"
|
|||
dependencies = [
|
||||
"ctrlc",
|
||||
"libc",
|
||||
"rustc_abi",
|
||||
"rustc_ast",
|
||||
"rustc_ast_lowering",
|
||||
"rustc_ast_passes",
|
||||
|
|
|
@ -41,13 +41,13 @@ use std::iter;
|
|||
use ast::visit::Visitor;
|
||||
use hir::def::{DefKind, PartialRes, Res};
|
||||
use hir::{BodyId, HirId};
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_ast::*;
|
||||
use rustc_errors::ErrorGuaranteed;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::{Asyncness, ResolverAstLowering};
|
||||
use rustc_span::{Ident, Span};
|
||||
use rustc_target::spec::abi;
|
||||
use {rustc_ast as ast, rustc_hir as hir};
|
||||
|
||||
use super::{GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode};
|
||||
|
@ -398,7 +398,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
safety: hir::Safety::Safe.into(),
|
||||
constness: hir::Constness::NotConst,
|
||||
asyncness: hir::IsAsync::NotAsync,
|
||||
abi: abi::Abi::Rust,
|
||||
abi: ExternAbi::Rust,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ use std::mem;
|
|||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use itertools::{Either, Itertools};
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::visit::{AssocCtxt, BoundKind, FnCtxt, FnKind, Visitor, walk_list};
|
||||
use rustc_ast::*;
|
||||
|
@ -35,7 +36,6 @@ use rustc_session::lint::builtin::{
|
|||
};
|
||||
use rustc_session::lint::{BuiltinLintDiag, LintBuffer};
|
||||
use rustc_span::{Ident, Span, kw, sym};
|
||||
use rustc_target::spec::abi;
|
||||
use thin_vec::thin_vec;
|
||||
|
||||
use crate::errors::{self, TildeConstReason};
|
||||
|
@ -723,7 +723,7 @@ impl<'a> AstValidator<'a> {
|
|||
MISSING_ABI,
|
||||
id,
|
||||
span,
|
||||
BuiltinLintDiag::MissingAbi(span, abi::Abi::FALLBACK),
|
||||
BuiltinLintDiag::MissingAbi(span, ExternAbi::FALLBACK),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
use std::str::FromStr;
|
||||
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_ast::attr::list_contains_name;
|
||||
use rustc_ast::expand::autodiff_attrs::{
|
||||
AutoDiffAttrs, DiffActivity, DiffMode, valid_input_activity, valid_ret_activity,
|
||||
|
@ -23,7 +24,7 @@ use rustc_middle::ty::{self as ty, TyCtxt};
|
|||
use rustc_session::parse::feature_err;
|
||||
use rustc_session::{Session, lint};
|
||||
use rustc_span::{Ident, Span, sym};
|
||||
use rustc_target::spec::{SanitizerSet, abi};
|
||||
use rustc_target::spec::SanitizerSet;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::errors;
|
||||
|
@ -219,7 +220,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
|
|||
|
||||
if !is_closure
|
||||
&& let Some(fn_sig) = fn_sig()
|
||||
&& fn_sig.skip_binder().abi() != abi::Abi::Rust
|
||||
&& fn_sig.skip_binder().abi() != ExternAbi::Rust
|
||||
{
|
||||
struct_span_code_err!(
|
||||
tcx.dcx(),
|
||||
|
|
|
@ -5,6 +5,7 @@ edition = "2021"
|
|||
|
||||
[dependencies]
|
||||
# tidy-alphabetical-start
|
||||
rustc_abi = { path = "../rustc_abi" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_lowering = { path = "../rustc_ast_lowering" }
|
||||
rustc_ast_passes = { path = "../rustc_ast_passes" }
|
||||
|
|
|
@ -747,7 +747,7 @@ fn print_crate_info(
|
|||
}
|
||||
}
|
||||
CallingConventions => {
|
||||
let mut calling_conventions = rustc_target::spec::abi::all_names();
|
||||
let mut calling_conventions = rustc_abi::all_names();
|
||||
calling_conventions.sort_unstable();
|
||||
println_info!("{}", calling_conventions.join("\n"));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! Checks validity of naked functions.
|
||||
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{LocalDefId, LocalModDefId};
|
||||
|
@ -11,7 +12,6 @@ use rustc_middle::span_bug;
|
|||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::lint::builtin::UNDEFINED_NAKED_FUNCTION_ABI;
|
||||
use rustc_span::{Span, sym};
|
||||
use rustc_target::spec::abi::Abi;
|
||||
|
||||
use crate::errors::{
|
||||
NakedAsmOutsideNakedFn, NakedFunctionsAsmBlock, NakedFunctionsMustNakedAsm, NoPatterns,
|
||||
|
@ -61,8 +61,8 @@ fn check_mod_naked_functions(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
|
|||
}
|
||||
|
||||
/// Checks that function uses non-Rust ABI.
|
||||
fn check_abi(tcx: TyCtxt<'_>, def_id: LocalDefId, abi: Abi) {
|
||||
if abi == Abi::Rust {
|
||||
fn check_abi(tcx: TyCtxt<'_>, def_id: LocalDefId, abi: ExternAbi) {
|
||||
if abi == ExternAbi::Rust {
|
||||
let hir_id = tcx.local_def_id_to_hir_id(def_id);
|
||||
let span = tcx.def_span(def_id);
|
||||
tcx.emit_node_span_lint(
|
||||
|
|
|
@ -57,10 +57,6 @@ use crate::spec::crt_objects::CrtObjects;
|
|||
|
||||
pub mod crt_objects;
|
||||
|
||||
pub mod abi {
|
||||
pub use rustc_abi::{AbiUnsupported, ExternAbi as Abi, all_names, lookup};
|
||||
}
|
||||
|
||||
mod base;
|
||||
mod json;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue