Skip to content

Commit d6be363

Browse files
Rollup merge of #132249 - workingjubilee:add-rustc-abi, r=compiler-errors
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 *significantly* entangled in my other PRs. This leaves an "excise rustc_target" step after the dust settles.
2 parents e20026c + 3f73fe7 commit d6be363

File tree

28 files changed

+39
-19
lines changed

28 files changed

+39
-19
lines changed

Cargo.lock

Lines changed: 9 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",
@@ -3906,6 +3908,7 @@ dependencies = [
39063908
name = "rustc_lint"
39073909
version = "0.0.0"
39083910
dependencies = [
3911+
"rustc_abi",
39093912
"rustc_ast",
39103913
"rustc_ast_pretty",
39113914
"rustc_attr",
@@ -3980,6 +3983,7 @@ dependencies = [
39803983
"bitflags 2.6.0",
39813984
"libloading",
39823985
"odht",
3986+
"rustc_abi",
39833987
"rustc_ast",
39843988
"rustc_attr",
39853989
"rustc_data_structures",
@@ -4074,6 +4078,7 @@ version = "0.0.0"
40744078
dependencies = [
40754079
"polonius-engine",
40764080
"regex",
4081+
"rustc_abi",
40774082
"rustc_ast",
40784083
"rustc_data_structures",
40794084
"rustc_errors",
@@ -4187,6 +4192,7 @@ dependencies = [
41874192
name = "rustc_passes"
41884193
version = "0.0.0"
41894194
dependencies = [
4195+
"rustc_abi",
41904196
"rustc_ast",
41914197
"rustc_ast_pretty",
41924198
"rustc_attr",
@@ -4213,6 +4219,7 @@ name = "rustc_pattern_analysis"
42134219
version = "0.0.0"
42144220
dependencies = [
42154221
"rustc-hash 2.0.0",
4222+
"rustc_abi",
42164223
"rustc_apfloat",
42174224
"rustc_arena",
42184225
"rustc_data_structures",
@@ -4352,6 +4359,7 @@ dependencies = [
43524359
"bitflags 2.6.0",
43534360
"getopts",
43544361
"libc",
4362+
"rustc_abi",
43554363
"rustc_ast",
43564364
"rustc_data_structures",
43574365
"rustc_errors",
@@ -4415,6 +4423,7 @@ version = "0.0.0"
44154423
dependencies = [
44164424
"punycode",
44174425
"rustc-demangle",
4426+
"rustc_abi",
44184427
"rustc_data_structures",
44194428
"rustc_errors",
44204429
"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_lint/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
# tidy-alphabetical-start
8+
rustc_abi = { path = "../rustc_abi" }
89
rustc_ast = { path = "../rustc_ast" }
910
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
1011
rustc_attr = { path = "../rustc_attr" }

compiler/rustc_lint/src/context.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use rustc_data_structures::sync;
1111
use rustc_data_structures::unord::UnordMap;
1212
use rustc_errors::{Diag, LintDiagnostic, MultiSpan};
1313
use rustc_feature::Features;
14-
use rustc_hir as hir;
1514
use rustc_hir::def::Res;
1615
use rustc_hir::def_id::{CrateNum, DefId};
1716
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
@@ -27,8 +26,8 @@ use rustc_session::{LintStoreMarker, Session};
2726
use rustc_span::Span;
2827
use rustc_span::edit_distance::find_best_match_for_names;
2928
use rustc_span::symbol::{Ident, Symbol, sym};
30-
use rustc_target::abi;
3129
use tracing::debug;
30+
use {rustc_abi as abi, rustc_hir as hir};
3231

3332
use self::TargetLint::*;
3433
use crate::levels::LintLevelsBuilder;

compiler/rustc_lint/src/foreign_modules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use rustc_abi::FIRST_VARIANT;
12
use rustc_data_structures::stack::ensure_sufficient_stack;
23
use rustc_data_structures::unord::{UnordMap, UnordSet};
34
use rustc_hir as hir;
@@ -6,7 +7,6 @@ use rustc_middle::query::Providers;
67
use rustc_middle::ty::{self, AdtDef, Instance, Ty, TyCtxt};
78
use rustc_session::declare_lint;
89
use rustc_span::{Span, Symbol, sym};
9-
use rustc_target::abi::FIRST_VARIANT;
1010
use tracing::{debug, instrument};
1111

1212
use crate::lints::{BuiltinClashingExtern, BuiltinClashingExternSub};

0 commit comments

Comments
 (0)