Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d540225

Browse files
committed
Auto merge of rust-lang#132554 - matthiaskrgr:rollup-vwm71z1, r=matthiaskrgr
Rollup of 16 pull requests Successful merges: - rust-lang#129329 (Implement `From<&mut {slice}>` for `Box/Rc/Arc<{slice}>`) - rust-lang#131377 (Add LowerExp and UpperExp implementations to NonZero) - rust-lang#132393 (Docs: added brief colon explanation) - rust-lang#132437 (coverage: Regression test for inlining into an uninstrumented crate) - rust-lang#132499 (unicode_data.rs: show command for generating file) - rust-lang#132503 (better test for const HashMap; remove const_hash leftovers) - rust-lang#132511 (stabilize const_arguments_as_str) - rust-lang#132520 (NFC add known bug nr to test) - rust-lang#132522 (make codegen help output more consistent) - rust-lang#132523 (Added regression test for generics index out of bounds) - rust-lang#132528 (Use `*_opt` typeck results fns to not ICE in fallback suggestion) - rust-lang#132537 (PassWrapper: adapt for llvm/llvm-project@5445edb5d) - rust-lang#132540 (Do not format generic consts) - rust-lang#132543 (add and update some crashtests) - rust-lang#132544 (Use backticks instead of single quotes for library feature names in diagnostics) - rust-lang#132550 (compiler: Continue introducing rustc_abi to the compiler) r? `@ghost` `@rustbot` modify labels: rollup
2 parents db034ce + 9c4884e commit d540225

File tree

169 files changed

+949
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+949
-524
lines changed

Cargo.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3346,6 +3346,7 @@ dependencies = [
33463346
"either",
33473347
"itertools",
33483348
"polonius-engine",
3349+
"rustc_abi",
33493350
"rustc_data_structures",
33503351
"rustc_errors",
33513352
"rustc_fluent_macro",
@@ -3359,7 +3360,6 @@ dependencies = [
33593360
"rustc_mir_dataflow",
33603361
"rustc_session",
33613362
"rustc_span",
3362-
"rustc_target",
33633363
"rustc_trait_selection",
33643364
"rustc_traits",
33653365
"smallvec",
@@ -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",
@@ -4131,6 +4132,7 @@ dependencies = [
41314132
name = "rustc_monomorphize"
41324133
version = "0.0.0"
41334134
dependencies = [
4135+
"rustc_abi",
41344136
"rustc_data_structures",
41354137
"rustc_errors",
41364138
"rustc_fluent_macro",
@@ -4335,6 +4337,7 @@ name = "rustc_sanitizers"
43354337
version = "0.0.0"
43364338
dependencies = [
43374339
"bitflags 2.6.0",
4340+
"rustc_abi",
43384341
"rustc_data_structures",
43394342
"rustc_hir",
43404343
"rustc_middle",
@@ -4467,6 +4470,7 @@ name = "rustc_trait_selection"
44674470
version = "0.0.0"
44684471
dependencies = [
44694472
"itertools",
4473+
"rustc_abi",
44704474
"rustc_ast",
44714475
"rustc_ast_ir",
44724476
"rustc_attr",
@@ -4483,7 +4487,6 @@ dependencies = [
44834487
"rustc_serialize",
44844488
"rustc_session",
44854489
"rustc_span",
4486-
"rustc_target",
44874490
"rustc_transmute",
44884491
"rustc_type_ir",
44894492
"smallvec",

compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ pub struct WhereClause {
414414
pub span: Span,
415415
}
416416

417+
impl WhereClause {
418+
pub fn is_empty(&self) -> bool {
419+
!self.has_where_token && self.predicates.is_empty()
420+
}
421+
}
422+
417423
impl Default for WhereClause {
418424
fn default() -> WhereClause {
419425
WhereClause { has_where_token: false, predicates: ThinVec::new(), span: DUMMY_SP }

compiler/rustc_borrowck/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ edition = "2021"
88
either = "1.5.0"
99
itertools = "0.12"
1010
polonius-engine = "0.13.0"
11+
rustc_abi = { path = "../rustc_abi" }
1112
rustc_data_structures = { path = "../rustc_data_structures" }
1213
rustc_errors = { path = "../rustc_errors" }
1314
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
@@ -21,7 +22,6 @@ rustc_middle = { path = "../rustc_middle" }
2122
rustc_mir_dataflow = { path = "../rustc_mir_dataflow" }
2223
rustc_session = { path = "../rustc_session" }
2324
rustc_span = { path = "../rustc_span" }
24-
rustc_target = { path = "../rustc_target" }
2525
rustc_trait_selection = { path = "../rustc_trait_selection" }
2626
rustc_traits = { path = "../rustc_traits" }
2727
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }

compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Borrow checker diagnostics.
22
3+
use rustc_abi::{FieldIdx, VariantIdx};
34
use rustc_errors::{Applicability, Diag, MultiSpan};
45
use rustc_hir::def::{CtorKind, Namespace};
56
use rustc_hir::{self as hir, CoroutineKind, LangItem};
@@ -21,7 +22,6 @@ use rustc_span::def_id::LocalDefId;
2122
use rustc_span::source_map::Spanned;
2223
use rustc_span::symbol::sym;
2324
use rustc_span::{DUMMY_SP, Span, Symbol};
24-
use rustc_target::abi::{FieldIdx, VariantIdx};
2525
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
2626
use rustc_trait_selection::infer::InferCtxtExt;
2727
use rustc_trait_selection::traits::{

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use core::ops::ControlFlow;
55

66
use hir::{ExprKind, Param};
7+
use rustc_abi::FieldIdx;
78
use rustc_errors::{Applicability, Diag};
89
use rustc_hir::intravisit::Visitor;
910
use rustc_hir::{self as hir, BindingMode, ByRef, Node};
@@ -16,7 +17,6 @@ use rustc_middle::mir::{
1617
use rustc_middle::ty::{self, InstanceKind, Ty, TyCtxt, Upcast};
1718
use rustc_span::symbol::{Symbol, kw};
1819
use rustc_span::{BytePos, DesugaringKind, Span, sym};
19-
use rustc_target::abi::FieldIdx;
2020
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
2121
use rustc_trait_selection::infer::InferCtxtExt;
2222
use rustc_trait_selection::traits;

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
11031103
peeled_ty,
11041104
liberated_sig.c_variadic,
11051105
hir::Safety::Safe,
1106-
rustc_target::spec::abi::Abi::Rust,
1106+
rustc_abi::ExternAbi::Rust,
11071107
)),
11081108
);
11091109
let closure_ty = Ty::new_closure(

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use std::marker::PhantomData;
2121
use std::ops::Deref;
2222

2323
use consumers::{BodyWithBorrowckFacts, ConsumerOptions};
24+
use rustc_abi::FieldIdx;
2425
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
2526
use rustc_data_structures::graph::dominators::Dominators;
2627
use rustc_errors::Diag;
@@ -45,7 +46,6 @@ use rustc_mir_dataflow::move_paths::{
4546
};
4647
use rustc_session::lint::builtin::UNUSED_MUT;
4748
use rustc_span::{Span, Symbol};
48-
use rustc_target::abi::FieldIdx;
4949
use smallvec::SmallVec;
5050
use tracing::{debug, instrument};
5151

compiler/rustc_borrowck/src/path_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
use rustc_abi::FieldIdx;
12
use rustc_data_structures::graph::dominators::Dominators;
23
use rustc_middle::mir::{BasicBlock, Body, BorrowKind, Location, Place, PlaceRef, ProjectionElem};
34
use rustc_middle::ty::TyCtxt;
4-
use rustc_target::abi::FieldIdx;
55
use tracing::debug;
66

77
use crate::borrow_set::{BorrowData, BorrowSet, TwoPhaseActivation};

compiler/rustc_borrowck/src/type_check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::rc::Rc;
44
use std::{fmt, iter, mem};
55

66
use either::Either;
7+
use rustc_abi::{FIRST_VARIANT, FieldIdx};
78
use rustc_data_structures::frozen::Frozen;
89
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
910
use rustc_errors::ErrorGuaranteed;
@@ -40,7 +41,6 @@ use rustc_span::def_id::CRATE_DEF_ID;
4041
use rustc_span::source_map::Spanned;
4142
use rustc_span::symbol::sym;
4243
use rustc_span::{DUMMY_SP, Span};
43-
use rustc_target::abi::{FIRST_VARIANT, FieldIdx};
4444
use rustc_trait_selection::traits::query::type_op::custom::{
4545
CustomTypeOp, scrape_region_constraints,
4646
};

compiler/rustc_hir/Cargo.toml

Lines changed: 1 addition & 0 deletions
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" }

0 commit comments

Comments
 (0)