Skip to content

Commit bb0cd56

Browse files
compiler: Replace rustc_target with _abi in _hir
1 parent 586766e commit bb0cd56

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -3706,6 +3706,7 @@ name = "rustc_hir"
37063706
version = "0.0.0"
37073707
dependencies = [
37083708
"odht",
3709+
"rustc_abi",
37093710
"rustc_arena",
37103711
"rustc_ast",
37113712
"rustc_data_structures",

compiler/rustc_hir/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2021"
66
[dependencies]
77
# tidy-alphabetical-start
88
odht = { version = "0.3.1", features = ["nightly"] }
9+
rustc_abi = { path = "../rustc_abi" }
910
rustc_arena = { path = "../rustc_arena" }
1011
rustc_ast = { path = "../rustc_ast" }
1112
rustc_data_structures = { path = "../rustc_data_structures" }

compiler/rustc_hir/src/hir.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::fmt;
22

3+
use rustc_abi::ExternAbi;
34
use rustc_ast::util::parser::ExprPrecedence;
45
use rustc_ast::{
56
self as ast, Attribute, FloatTy, InlineAsmOptions, InlineAsmTemplatePiece, IntTy, Label,
@@ -19,7 +20,6 @@ use rustc_span::source_map::Spanned;
1920
use rustc_span::symbol::{Ident, Symbol, kw, sym};
2021
use rustc_span::{BytePos, DUMMY_SP, ErrorGuaranteed, Span};
2122
use rustc_target::asm::InlineAsmRegOrRegClass;
22-
use rustc_target::spec::abi::Abi;
2323
use smallvec::SmallVec;
2424
use tracing::debug;
2525

@@ -2735,7 +2735,7 @@ impl PrimTy {
27352735
#[derive(Debug, Clone, Copy, HashStable_Generic)]
27362736
pub struct BareFnTy<'hir> {
27372737
pub safety: Safety,
2738-
pub abi: Abi,
2738+
pub abi: ExternAbi,
27392739
pub generic_params: &'hir [GenericParam<'hir>],
27402740
pub decl: &'hir FnDecl<'hir>,
27412741
pub param_names: &'hir [Ident],
@@ -3313,7 +3313,7 @@ impl<'hir> Item<'hir> {
33133313

33143314
expect_mod, &'hir Mod<'hir>, ItemKind::Mod(m), m;
33153315

3316-
expect_foreign_mod, (Abi, &'hir [ForeignItemRef]),
3316+
expect_foreign_mod, (ExternAbi, &'hir [ForeignItemRef]),
33173317
ItemKind::ForeignMod { abi, items }, (*abi, items);
33183318

33193319
expect_global_asm, &'hir InlineAsm<'hir>, ItemKind::GlobalAsm(asm), asm;
@@ -3386,7 +3386,7 @@ pub struct FnHeader {
33863386
pub safety: Safety,
33873387
pub constness: Constness,
33883388
pub asyncness: IsAsync,
3389-
pub abi: Abi,
3389+
pub abi: ExternAbi,
33903390
}
33913391

33923392
impl FnHeader {
@@ -3428,7 +3428,7 @@ pub enum ItemKind<'hir> {
34283428
/// A module.
34293429
Mod(&'hir Mod<'hir>),
34303430
/// An external module, e.g. `extern { .. }`.
3431-
ForeignMod { abi: Abi, items: &'hir [ForeignItemRef] },
3431+
ForeignMod { abi: ExternAbi, items: &'hir [ForeignItemRef] },
34323432
/// Module-level inline assembly (from `global_asm!`).
34333433
GlobalAsm(&'hir InlineAsm<'hir>),
34343434
/// A type alias, e.g., `type Foo = Bar<u8>`.

0 commit comments

Comments
 (0)