Skip to content

Commit 4839d6e

Browse files
compiler: Add rustc_abi dependence to the compiler
Depend on rustc_abi in compiler crates that use it indirectly but have not yet taken on that dependency, and are not entangled in my other PRs. This leaves an "excise rustc_target" step after the dust settles.
1 parent 5f5c243 commit 4839d6e

File tree

24 files changed

+34
-15
lines changed

24 files changed

+34
-15
lines changed

Cargo.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3621,6 +3621,7 @@ version = "0.0.0"
36213621
dependencies = [
36223622
"annotate-snippets 0.11.4",
36233623
"derive_setters",
3624+
"rustc_abi",
36243625
"rustc_ast",
36253626
"rustc_ast_pretty",
36263627
"rustc_data_structures",
@@ -3718,6 +3719,7 @@ name = "rustc_hir_analysis"
37183719
version = "0.0.0"
37193720
dependencies = [
37203721
"itertools",
3722+
"rustc_abi",
37213723
"rustc_arena",
37223724
"rustc_ast",
37233725
"rustc_attr",
@@ -3980,6 +3982,7 @@ dependencies = [
39803982
"bitflags 2.6.0",
39813983
"libloading",
39823984
"odht",
3985+
"rustc_abi",
39833986
"rustc_ast",
39843987
"rustc_attr",
39853988
"rustc_data_structures",
@@ -4074,6 +4077,7 @@ version = "0.0.0"
40744077
dependencies = [
40754078
"polonius-engine",
40764079
"regex",
4080+
"rustc_abi",
40774081
"rustc_ast",
40784082
"rustc_data_structures",
40794083
"rustc_errors",
@@ -4187,6 +4191,7 @@ dependencies = [
41874191
name = "rustc_passes"
41884192
version = "0.0.0"
41894193
dependencies = [
4194+
"rustc_abi",
41904195
"rustc_ast",
41914196
"rustc_ast_pretty",
41924197
"rustc_attr",
@@ -4213,6 +4218,7 @@ name = "rustc_pattern_analysis"
42134218
version = "0.0.0"
42144219
dependencies = [
42154220
"rustc-hash 2.0.0",
4221+
"rustc_abi",
42164222
"rustc_apfloat",
42174223
"rustc_arena",
42184224
"rustc_data_structures",
@@ -4352,6 +4358,7 @@ dependencies = [
43524358
"bitflags 2.6.0",
43534359
"getopts",
43544360
"libc",
4361+
"rustc_abi",
43554362
"rustc_ast",
43564363
"rustc_data_structures",
43574364
"rustc_errors",
@@ -4415,6 +4422,7 @@ version = "0.0.0"
44154422
dependencies = [
44164423
"punycode",
44174424
"rustc-demangle",
4425+
"rustc_abi",
44184426
"rustc_data_structures",
44194427
"rustc_errors",
44204428
"rustc_hir",

compiler/rustc_errors/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77
# tidy-alphabetical-start
88
annotate-snippets = "0.11"
99
derive_setters = "0.1.6"
10+
rustc_abi = { path = "../rustc_abi" }
1011
rustc_ast = { path = "../rustc_ast" }
1112
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
1213
rustc_data_structures = { path = "../rustc_data_structures" }

compiler/rustc_errors/src/diagnostic_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use std::num::ParseIntError;
55
use std::path::{Path, PathBuf};
66
use std::process::ExitStatus;
77

8+
use rustc_abi::TargetDataLayoutErrors;
89
use rustc_ast_pretty::pprust;
910
use rustc_macros::Subdiagnostic;
1011
use rustc_span::Span;
1112
use rustc_span::edition::Edition;
1213
use rustc_span::symbol::{Ident, MacroRulesNormalizedIdent, Symbol};
13-
use rustc_target::abi::TargetDataLayoutErrors;
1414
use rustc_target::spec::{PanicStrategy, SplitDebuginfo, StackProtector, TargetTriple};
1515
use rustc_type_ir::{ClosureKind, FloatTy};
1616
use {rustc_ast as ast, rustc_hir as hir};

compiler/rustc_hir_analysis/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ doctest = false
1010
[dependencies]
1111
# tidy-alphabetical-start
1212
itertools = "0.12"
13+
rustc_abi = { path = "../rustc_abi" }
1314
rustc_arena = { path = "../rustc_arena" }
1415
rustc_ast = { path = "../rustc_ast" }
1516
rustc_attr = { path = "../rustc_attr" }

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::cell::LazyCell;
22
use std::ops::ControlFlow;
33

4+
use rustc_abi::FieldIdx;
45
use rustc_data_structures::unord::{UnordMap, UnordSet};
56
use rustc_errors::MultiSpan;
67
use rustc_errors::codes::*;
@@ -23,7 +24,6 @@ use rustc_middle::ty::{
2324
TypeVisitableExt,
2425
};
2526
use rustc_session::lint::builtin::UNINHABITED_STATIC;
26-
use rustc_target::abi::FieldIdx;
2727
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
2828
use rustc_trait_selection::error_reporting::traits::on_unimplemented::OnUnimplementedDirective;
2929
use rustc_trait_selection::traits;

compiler/rustc_hir_analysis/src/check/intrinsicck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::assert_matches::debug_assert_matches;
22

3+
use rustc_abi::FieldIdx;
34
use rustc_ast::InlineAsmTemplatePiece;
45
use rustc_data_structures::fx::FxIndexSet;
56
use rustc_hir::{self as hir, LangItem};
@@ -8,7 +9,6 @@ use rustc_middle::ty::{self, FloatTy, IntTy, Ty, TyCtxt, TypeVisitableExt, UintT
89
use rustc_session::lint;
910
use rustc_span::Symbol;
1011
use rustc_span::def_id::LocalDefId;
11-
use rustc_target::abi::FieldIdx;
1212
use rustc_target::asm::{
1313
InlineAsmReg, InlineAsmRegClass, InlineAsmRegOrRegClass, InlineAsmType, ModifierInfo,
1414
};

compiler/rustc_hir_analysis/src/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub mod wfcheck;
7474
use std::num::NonZero;
7575

7676
pub use check::{check_abi, check_abi_fn_ptr};
77+
use rustc_abi::VariantIdx;
7778
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
7879
use rustc_errors::{Diag, ErrorGuaranteed, pluralize, struct_span_code_err};
7980
use rustc_hir::def_id::{DefId, LocalDefId};
@@ -90,7 +91,6 @@ use rustc_session::parse::feature_err;
9091
use rustc_span::def_id::CRATE_DEF_ID;
9192
use rustc_span::symbol::{Ident, kw, sym};
9293
use rustc_span::{BytePos, DUMMY_SP, Span, Symbol};
93-
use rustc_target::abi::VariantIdx;
9494
use rustc_target::spec::abi::Abi;
9595
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
9696
use rustc_trait_selection::error_reporting::infer::ObligationCauseExt as _;

compiler/rustc_metadata/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ edition = "2021"
88
bitflags = "2.4.1"
99
libloading = "0.8.0"
1010
odht = { version = "0.3.1", features = ["nightly"] }
11+
rustc_abi = { path = "../rustc_abi" }
1112
rustc_ast = { path = "../rustc_ast" }
1213
rustc_attr = { path = "../rustc_attr" }
1314
rustc_data_structures = { path = "../rustc_data_structures" }

compiler/rustc_metadata/src/rmeta/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use decoder::{DecodeContext, Metadata};
66
use def_path_hash_map::DefPathHashMapRef;
77
use encoder::EncodeContext;
88
pub use encoder::{EncodedMetadata, encode_metadata, rendered_const};
9+
use rustc_abi::{FieldIdx, VariantIdx};
910
use rustc_ast::expand::StrippedCfgItem;
1011
use rustc_data_structures::fx::FxHashMap;
1112
use rustc_data_structures::svh::Svh;
@@ -37,7 +38,6 @@ use rustc_span::edition::Edition;
3738
use rustc_span::hygiene::{ExpnIndex, MacroKind, SyntaxContextData};
3839
use rustc_span::symbol::{Ident, Symbol};
3940
use rustc_span::{self, ExpnData, ExpnHash, ExpnId, Span};
40-
use rustc_target::abi::{FieldIdx, VariantIdx};
4141
use rustc_target::spec::{PanicStrategy, TargetTriple};
4242
use table::TableBuilder;
4343
use {rustc_ast as ast, rustc_attr as attr, rustc_hir as hir};

compiler/rustc_mir_dataflow/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77
# tidy-alphabetical-start
88
polonius-engine = "0.13.0"
99
regex = "1"
10+
rustc_abi = { path = "../rustc_abi" }
1011
rustc_ast = { path = "../rustc_ast" }
1112
rustc_data_structures = { path = "../rustc_data_structures" }
1213
rustc_errors = { path = "../rustc_errors" }

0 commit comments

Comments
 (0)