compiler: Replace rustc_target with _abi in _hir

This commit is contained in:
Jubilee Young 2024-11-02 20:24:38 -07:00
parent 586766e790
commit bb0cd5606a
3 changed files with 7 additions and 5 deletions

View File

@ -3706,6 +3706,7 @@ name = "rustc_hir"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"odht", "odht",
"rustc_abi",
"rustc_arena", "rustc_arena",
"rustc_ast", "rustc_ast",
"rustc_data_structures", "rustc_data_structures",

View File

@ -6,6 +6,7 @@ edition = "2021"
[dependencies] [dependencies]
# tidy-alphabetical-start # tidy-alphabetical-start
odht = { version = "0.3.1", features = ["nightly"] } odht = { version = "0.3.1", features = ["nightly"] }
rustc_abi = { path = "../rustc_abi" }
rustc_arena = { path = "../rustc_arena" } rustc_arena = { path = "../rustc_arena" }
rustc_ast = { path = "../rustc_ast" } rustc_ast = { path = "../rustc_ast" }
rustc_data_structures = { path = "../rustc_data_structures" } rustc_data_structures = { path = "../rustc_data_structures" }

View File

@ -1,5 +1,6 @@
use std::fmt; use std::fmt;
use rustc_abi::ExternAbi;
use rustc_ast::util::parser::ExprPrecedence; use rustc_ast::util::parser::ExprPrecedence;
use rustc_ast::{ use rustc_ast::{
self as ast, Attribute, FloatTy, InlineAsmOptions, InlineAsmTemplatePiece, IntTy, Label, self as ast, Attribute, FloatTy, InlineAsmOptions, InlineAsmTemplatePiece, IntTy, Label,
@ -19,7 +20,6 @@
use rustc_span::symbol::{Ident, Symbol, kw, sym}; use rustc_span::symbol::{Ident, Symbol, kw, sym};
use rustc_span::{BytePos, DUMMY_SP, ErrorGuaranteed, Span}; use rustc_span::{BytePos, DUMMY_SP, ErrorGuaranteed, Span};
use rustc_target::asm::InlineAsmRegOrRegClass; use rustc_target::asm::InlineAsmRegOrRegClass;
use rustc_target::spec::abi::Abi;
use smallvec::SmallVec; use smallvec::SmallVec;
use tracing::debug; use tracing::debug;
@ -2735,7 +2735,7 @@ pub fn from_name(name: Symbol) -> Option<Self> {
#[derive(Debug, Clone, Copy, HashStable_Generic)] #[derive(Debug, Clone, Copy, HashStable_Generic)]
pub struct BareFnTy<'hir> { pub struct BareFnTy<'hir> {
pub safety: Safety, pub safety: Safety,
pub abi: Abi, pub abi: ExternAbi,
pub generic_params: &'hir [GenericParam<'hir>], pub generic_params: &'hir [GenericParam<'hir>],
pub decl: &'hir FnDecl<'hir>, pub decl: &'hir FnDecl<'hir>,
pub param_names: &'hir [Ident], pub param_names: &'hir [Ident],
@ -3313,7 +3313,7 @@ pub fn is_struct_or_union(&self) -> bool {
expect_mod, &'hir Mod<'hir>, ItemKind::Mod(m), m; expect_mod, &'hir Mod<'hir>, ItemKind::Mod(m), m;
expect_foreign_mod, (Abi, &'hir [ForeignItemRef]), expect_foreign_mod, (ExternAbi, &'hir [ForeignItemRef]),
ItemKind::ForeignMod { abi, items }, (*abi, items); ItemKind::ForeignMod { abi, items }, (*abi, items);
expect_global_asm, &'hir InlineAsm<'hir>, ItemKind::GlobalAsm(asm), asm; expect_global_asm, &'hir InlineAsm<'hir>, ItemKind::GlobalAsm(asm), asm;
@ -3386,7 +3386,7 @@ pub struct FnHeader {
pub safety: Safety, pub safety: Safety,
pub constness: Constness, pub constness: Constness,
pub asyncness: IsAsync, pub asyncness: IsAsync,
pub abi: Abi, pub abi: ExternAbi,
} }
impl FnHeader { impl FnHeader {
@ -3428,7 +3428,7 @@ pub enum ItemKind<'hir> {
/// A module. /// A module.
Mod(&'hir Mod<'hir>), Mod(&'hir Mod<'hir>),
/// An external module, e.g. `extern { .. }`. /// An external module, e.g. `extern { .. }`.
ForeignMod { abi: Abi, items: &'hir [ForeignItemRef] }, ForeignMod { abi: ExternAbi, items: &'hir [ForeignItemRef] },
/// Module-level inline assembly (from `global_asm!`). /// Module-level inline assembly (from `global_asm!`).
GlobalAsm(&'hir InlineAsm<'hir>), GlobalAsm(&'hir InlineAsm<'hir>),
/// A type alias, e.g., `type Foo = Bar<u8>`. /// A type alias, e.g., `type Foo = Bar<u8>`.