Skip to content

Commit ea2a2bd

Browse files
authored
Merge pull request #4229 from rust-lang/rustup-2025-03-16
Automatic Rustup
2 parents b724fab + 17ae00d commit ea2a2bd

File tree

469 files changed

+2635
-1842
lines changed

Some content is hidden

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

469 files changed

+2635
-1842
lines changed

.github/workflows/post-merge.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ jobs:
3535
3636
cd src/ci/citool
3737
38-
echo "Post-merge analysis result" > output.log
38+
printf "*This is an experimental post-merge analysis report. You can ignore it.*\n\n" > output.log
39+
printf "<details>\n<summary>Post-merge report</summary>\n\n" >> output.log
40+
3941
cargo run --release post-merge-report ${PARENT_COMMIT} ${{ github.sha }} >> output.log
42+
43+
printf "</details>\n" >> output.log
44+
4045
cat output.log
4146
4247
gh pr comment ${HEAD_PR} -F output.log

Cargo.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3440,7 +3440,6 @@ dependencies = [
34403440
"rustc_symbol_mangling",
34413441
"rustc_target",
34423442
"rustc_trait_selection",
3443-
"rustc_type_ir",
34443443
"serde_json",
34453444
"smallvec",
34463445
"tempfile",
@@ -3473,7 +3472,6 @@ dependencies = [
34733472
"rustc_span",
34743473
"rustc_target",
34753474
"rustc_trait_selection",
3476-
"rustc_type_ir",
34773475
"tracing",
34783476
]
34793477

@@ -3736,7 +3734,6 @@ dependencies = [
37363734
"rustc_span",
37373735
"rustc_target",
37383736
"rustc_trait_selection",
3739-
"rustc_type_ir",
37403737
"smallvec",
37413738
"tracing",
37423739
]
@@ -3775,7 +3772,6 @@ dependencies = [
37753772
"rustc_session",
37763773
"rustc_span",
37773774
"rustc_trait_selection",
3778-
"rustc_type_ir",
37793775
"smallvec",
37803776
"tracing",
37813777
]
@@ -3922,7 +3918,6 @@ dependencies = [
39223918
"rustc_span",
39233919
"rustc_target",
39243920
"rustc_trait_selection",
3925-
"rustc_type_ir",
39263921
"smallvec",
39273922
"tracing",
39283923
"unicode-security",
@@ -3998,7 +3993,6 @@ dependencies = [
39983993
"rustc_session",
39993994
"rustc_span",
40003995
"rustc_target",
4001-
"rustc_type_ir",
40023996
"tempfile",
40033997
"tracing",
40043998
]
@@ -4114,7 +4108,6 @@ dependencies = [
41144108
"rustc_span",
41154109
"rustc_target",
41164110
"rustc_trait_selection",
4117-
"rustc_type_ir",
41184111
"smallvec",
41194112
"tracing",
41204113
]
@@ -4538,7 +4531,6 @@ dependencies = [
45384531
"rustc_span",
45394532
"rustc_target",
45404533
"rustc_trait_selection",
4541-
"rustc_type_ir",
45424534
"tracing",
45434535
]
45444536

compiler/rustc_abi/src/lib.rs

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use rustc_data_structures::stable_hasher::StableOrd;
5252
use rustc_hashes::Hash64;
5353
use rustc_index::{Idx, IndexSlice, IndexVec};
5454
#[cfg(feature = "nightly")]
55-
use rustc_macros::{Decodable_Generic, Encodable_Generic, HashStable_Generic};
55+
use rustc_macros::{Decodable_NoContext, Encodable_NoContext, HashStable_Generic};
5656

5757
mod callconv;
5858
mod layout;
@@ -74,7 +74,10 @@ pub use layout::{LayoutCalculator, LayoutCalculatorError};
7474
pub trait HashStableContext {}
7575

7676
#[derive(Clone, Copy, PartialEq, Eq, Default)]
77-
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]
77+
#[cfg_attr(
78+
feature = "nightly",
79+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_Generic)
80+
)]
7881
pub struct ReprFlags(u8);
7982

8083
bitflags! {
@@ -106,7 +109,10 @@ impl std::fmt::Debug for ReprFlags {
106109
}
107110

108111
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
109-
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]
112+
#[cfg_attr(
113+
feature = "nightly",
114+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_Generic)
115+
)]
110116
pub enum IntegerType {
111117
/// Pointer-sized integer type, i.e. `isize` and `usize`. The field shows signedness, e.g.
112118
/// `Pointer(true)` means `isize`.
@@ -127,7 +133,10 @@ impl IntegerType {
127133

128134
/// Represents the repr options provided by the user.
129135
#[derive(Copy, Clone, Debug, Eq, PartialEq, Default)]
130-
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]
136+
#[cfg_attr(
137+
feature = "nightly",
138+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_Generic)
139+
)]
131140
pub struct ReprOptions {
132141
pub int: Option<IntegerType>,
133142
pub align: Option<Align>,
@@ -487,7 +496,10 @@ impl FromStr for Endian {
487496

488497
/// Size of a type in bytes.
489498
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
490-
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]
499+
#[cfg_attr(
500+
feature = "nightly",
501+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_Generic)
502+
)]
491503
pub struct Size {
492504
raw: u64,
493505
}
@@ -713,7 +725,10 @@ impl Step for Size {
713725

714726
/// Alignment of a type in bytes (always a power of two).
715727
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
716-
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]
728+
#[cfg_attr(
729+
feature = "nightly",
730+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_Generic)
731+
)]
717732
pub struct Align {
718733
pow2: u8,
719734
}
@@ -872,7 +887,10 @@ impl AbiAndPrefAlign {
872887

873888
/// Integers, also used for enum discriminants.
874889
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
875-
#[cfg_attr(feature = "nightly", derive(Encodable_Generic, Decodable_Generic, HashStable_Generic))]
890+
#[cfg_attr(
891+
feature = "nightly",
892+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_Generic)
893+
)]
876894
pub enum Integer {
877895
I8,
878896
I16,

compiler/rustc_ast_ir/src/lib.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
// tidy-alphabetical-end
1313

1414
#[cfg(feature = "nightly")]
15-
use rustc_macros::{Decodable, Encodable, HashStable_NoContext};
15+
use rustc_macros::{Decodable_NoContext, Encodable_NoContext, HashStable_NoContext};
1616

1717
pub mod visit;
1818

1919
/// The movability of a coroutine / closure literal:
2020
/// whether a coroutine contains self-references, causing it to be `!Unpin`.
2121
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Copy)]
22-
#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_NoContext))]
22+
#[cfg_attr(
23+
feature = "nightly",
24+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_NoContext)
25+
)]
2326
pub enum Movability {
2427
/// May contain self-references, `!Unpin`.
2528
Static,
@@ -28,7 +31,10 @@ pub enum Movability {
2831
}
2932

3033
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Copy)]
31-
#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_NoContext))]
34+
#[cfg_attr(
35+
feature = "nightly",
36+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_NoContext)
37+
)]
3238
pub enum Mutability {
3339
// N.B. Order is deliberate, so that Not < Mut
3440
Not,
@@ -87,7 +93,10 @@ impl Mutability {
8793
}
8894

8995
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Copy)]
90-
#[cfg_attr(feature = "nightly", derive(Encodable, Decodable, HashStable_NoContext))]
96+
#[cfg_attr(
97+
feature = "nightly",
98+
derive(Encodable_NoContext, Decodable_NoContext, HashStable_NoContext)
99+
)]
91100
pub enum Pinnedness {
92101
Not,
93102
Pinned,

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
15161516
fn lower_fn_params_to_names(&mut self, decl: &FnDecl) -> &'hir [Ident] {
15171517
self.arena.alloc_from_iter(decl.inputs.iter().map(|param| match param.pat.kind {
15181518
PatKind::Ident(_, ident, _) => self.lower_ident(ident),
1519-
_ => Ident::new(kw::Empty, self.lower_span(param.pat.span)),
1519+
PatKind::Wild => Ident::new(kw::Underscore, self.lower_span(param.pat.span)),
1520+
_ => {
1521+
self.dcx().span_delayed_bug(
1522+
param.pat.span,
1523+
"non-ident/wild param pat must trigger an error",
1524+
);
1525+
Ident::new(kw::Empty, self.lower_span(param.pat.span))
1526+
}
15201527
}))
15211528
}
15221529

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ use rustc_infer::infer::{NllRegionVariableOrigin, RelateParamBound};
1414
use rustc_middle::bug;
1515
use rustc_middle::hir::place::PlaceBase;
1616
use rustc_middle::mir::{AnnotationSource, ConstraintCategory, ReturnConstraint};
17-
use rustc_middle::ty::fold::fold_regions;
1817
use rustc_middle::ty::{
19-
self, GenericArgs, Region, RegionVid, Ty, TyCtxt, TypeFoldable, TypeVisitor,
18+
self, GenericArgs, Region, RegionVid, Ty, TyCtxt, TypeFoldable, TypeVisitor, fold_regions,
2019
};
2120
use rustc_span::{Ident, Span, kw};
2221
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ use rustc_infer::infer::{
3535
};
3636
use rustc_middle::mir::*;
3737
use rustc_middle::query::Providers;
38-
use rustc_middle::ty::fold::fold_regions;
39-
use rustc_middle::ty::{self, ParamEnv, RegionVid, TyCtxt, TypingMode};
38+
use rustc_middle::ty::{self, ParamEnv, RegionVid, TyCtxt, TypingMode, fold_regions};
4039
use rustc_middle::{bug, span_bug};
4140
use rustc_mir_dataflow::impls::{
4241
EverInitializedPlaces, MaybeInitializedPlaces, MaybeUninitializedPlaces,

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ use rustc_middle::mir::{
1818
ReturnConstraint, TerminatorKind,
1919
};
2020
use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
21-
use rustc_middle::ty::fold::fold_regions;
22-
use rustc_middle::ty::{self, RegionVid, Ty, TyCtxt, TypeFoldable, UniverseIndex};
21+
use rustc_middle::ty::{self, RegionVid, Ty, TyCtxt, TypeFoldable, UniverseIndex, fold_regions};
2322
use rustc_mir_dataflow::points::DenseLocationMap;
2423
use rustc_span::hygiene::DesugaringKind;
2524
use rustc_span::{DUMMY_SP, Span};

compiler/rustc_borrowck/src/region_infer/opaque_types.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ use rustc_hir::def_id::LocalDefId;
55
use rustc_infer::infer::outlives::env::OutlivesEnvironment;
66
use rustc_infer::infer::{InferCtxt, NllRegionVariableOrigin, TyCtxtInferExt as _};
77
use rustc_macros::extension;
8-
use rustc_middle::ty::fold::fold_regions;
9-
use rustc_middle::ty::visit::TypeVisitableExt;
108
use rustc_middle::ty::{
119
self, GenericArgKind, GenericArgs, OpaqueHiddenType, OpaqueTypeKey, Ty, TyCtxt, TypeFoldable,
12-
TypingMode,
10+
TypeVisitableExt, TypingMode, fold_regions,
1311
};
1412
use rustc_span::Span;
1513
use rustc_trait_selection::regions::OutlivesEnvironmentBuildExt;

compiler/rustc_borrowck/src/renumber.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ use rustc_index::IndexSlice;
22
use rustc_infer::infer::NllRegionVariableOrigin;
33
use rustc_middle::mir::visit::{MutVisitor, TyContext};
44
use rustc_middle::mir::{Body, ConstOperand, Location, Promoted};
5-
use rustc_middle::ty::fold::fold_regions;
6-
use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeFoldable};
5+
use rustc_middle::ty::{self, GenericArgsRef, Ty, TyCtxt, TypeFoldable, fold_regions};
76
use rustc_span::Symbol;
87
use tracing::{debug, instrument};
98

0 commit comments

Comments
 (0)