mirror of https://github.com/rust-lang/rust.git
compiler: Replace rustc_target with _abi in _trait_selection
This commit is contained in:
parent
bb0cd5606a
commit
4046e3610c
|
@ -4468,6 +4468,7 @@ name = "rustc_trait_selection"
|
|||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"itertools",
|
||||
"rustc_abi",
|
||||
"rustc_ast",
|
||||
"rustc_ast_ir",
|
||||
"rustc_attr",
|
||||
|
@ -4484,7 +4485,6 @@ dependencies = [
|
|||
"rustc_serialize",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"rustc_target",
|
||||
"rustc_transmute",
|
||||
"rustc_type_ir",
|
||||
"smallvec",
|
||||
|
|
|
@ -6,6 +6,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
# tidy-alphabetical-start
|
||||
itertools = "0.12"
|
||||
rustc_abi = { path = "../rustc_abi" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_ir = { path = "../rustc_ast_ir" }
|
||||
rustc_attr = { path = "../rustc_attr" }
|
||||
|
@ -22,7 +23,6 @@ rustc_query_system = { path = "../rustc_query_system" }
|
|||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_target = { path = "../rustc_target" }
|
||||
rustc_transmute = { path = "../rustc_transmute", features = ["rustc"] }
|
||||
rustc_type_ir = { path = "../rustc_type_ir" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
|
|
|
@ -50,6 +50,7 @@ use std::ops::ControlFlow;
|
|||
use std::path::PathBuf;
|
||||
use std::{cmp, fmt, iter};
|
||||
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
|
||||
use rustc_errors::{Applicability, Diag, DiagStyledString, IntoDiagArg, StringPart, pluralize};
|
||||
use rustc_hir::def::DefKind;
|
||||
|
@ -67,7 +68,6 @@ use rustc_middle::ty::{
|
|||
TypeVisitableExt,
|
||||
};
|
||||
use rustc_span::{BytePos, DesugaringKind, Pos, Span, sym};
|
||||
use rustc_target::spec::abi;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::error_reporting::TypeErrCtxt;
|
||||
|
@ -686,10 +686,10 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
|
||||
// unsafe extern "C" for<'a> fn(&'a T) -> &'a T
|
||||
// ^^^^^^^^^^
|
||||
if sig1.abi != abi::Abi::Rust {
|
||||
if sig1.abi != ExternAbi::Rust {
|
||||
values.0.push(format!("extern {} ", sig1.abi), sig1.abi != sig2.abi);
|
||||
}
|
||||
if sig2.abi != abi::Abi::Rust {
|
||||
if sig2.abi != ExternAbi::Rust {
|
||||
values.1.push(format!("extern {} ", sig2.abi), sig1.abi != sig2.abi);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ use std::iter;
|
|||
use std::path::PathBuf;
|
||||
|
||||
use itertools::{EitherOrBoth, Itertools};
|
||||
use rustc_abi::ExternAbi;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_errors::codes::*;
|
||||
|
@ -38,7 +39,6 @@ use rustc_middle::{bug, span_bug};
|
|||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::symbol::{Ident, Symbol, kw, sym};
|
||||
use rustc_span::{BytePos, DUMMY_SP, DesugaringKind, ExpnKind, MacroKind, Span};
|
||||
use rustc_target::spec::abi;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use super::{
|
||||
|
@ -1916,7 +1916,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
infcx.next_ty_var(DUMMY_SP),
|
||||
false,
|
||||
hir::Safety::Safe,
|
||||
abi::Abi::Rust,
|
||||
ExternAbi::Rust,
|
||||
)
|
||||
}
|
||||
_ => infcx.tcx.mk_fn_sig(
|
||||
|
@ -1924,7 +1924,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
infcx.next_ty_var(DUMMY_SP),
|
||||
false,
|
||||
hir::Safety::Safe,
|
||||
abi::Abi::Rust,
|
||||
ExternAbi::Rust,
|
||||
),
|
||||
};
|
||||
|
||||
|
@ -3996,7 +3996,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
&& let [self_ty, found_ty] = trait_ref.args.as_slice()
|
||||
&& let Some(fn_ty) = self_ty.as_type().filter(|ty| ty.is_fn())
|
||||
&& let fn_sig @ ty::FnSig {
|
||||
abi: abi::Abi::Rust,
|
||||
abi: ExternAbi::Rust,
|
||||
c_variadic: false,
|
||||
safety: hir::Safety::Safe,
|
||||
..
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
use std::iter;
|
||||
use std::ops::ControlFlow;
|
||||
|
||||
use rustc_abi::BackendRepr;
|
||||
use rustc_errors::FatalError;
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -18,7 +19,6 @@ use rustc_middle::ty::{
|
|||
};
|
||||
use rustc_span::Span;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_target::abi::BackendRepr;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
|
|
Loading…
Reference in New Issue