compiler: Replace rustc_target with _abi in _trait_selection

This commit is contained in:
Jubilee Young 2024-11-02 20:25:30 -07:00
parent bb0cd5606a
commit 4046e3610c
5 changed files with 10 additions and 10 deletions

View file

@ -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);
}

View file

@ -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,
..

View file

@ -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};