Skip to content

Commit dd91d77

Browse files
authored
Merge pull request rust-lang#4537 from rust-lang/rustup-2025-08-22
Automatic Rustup
2 parents ad8b241 + 4833659 commit dd91d77

File tree

233 files changed

+2622
-2145
lines changed

Some content is hidden

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

233 files changed

+2622
-2145
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ jobs:
117117
with:
118118
fetch-depth: 2
119119

120-
# Free up disk space on Linux and Windows by removing preinstalled components that
120+
# Free up disk space on Linux by removing preinstalled components that
121121
# we do not need. We do this to enable some of the less resource
122122
# intensive jobs to run on free runners, which however also have
123123
# less disk space.
124124
- name: free up disk space
125-
run: src/ci/scripts/free-disk-space.sh
125+
run: src/ci/scripts/free-disk-space-linux.sh
126126
if: matrix.free_disk
127127

128128
# If we don't need to free up disk space then just report how much space we have
@@ -223,11 +223,6 @@ jobs:
223223
cd src/ci/citool
224224
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
225225
226-
- name: wait for Windows disk cleanup to finish
227-
if: ${{ matrix.free_disk && startsWith(matrix.os, 'windows-') }}
228-
run: |
229-
python3 src/ci/scripts/free-disk-space-windows-wait.py
230-
231226
- name: run the build
232227
run: |
233228
set +e

Cargo.lock

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3367,6 +3367,7 @@ dependencies = [
33673367
"rand 0.9.2",
33683368
"rand_xoshiro",
33693369
"rustc_data_structures",
3370+
"rustc_error_messages",
33703371
"rustc_hashes",
33713372
"rustc_index",
33723373
"rustc_macros",
@@ -3480,7 +3481,6 @@ dependencies = [
34803481
name = "rustc_attr_parsing"
34813482
version = "0.0.0"
34823483
dependencies = [
3483-
"itertools",
34843484
"rustc_abi",
34853485
"rustc_ast",
34863486
"rustc_ast_pretty",
@@ -3779,6 +3779,8 @@ dependencies = [
37793779
"icu_locid",
37803780
"icu_provider_adapters",
37813781
"intl-memoizer",
3782+
"rustc_ast",
3783+
"rustc_ast_pretty",
37823784
"rustc_baked_icu_data",
37833785
"rustc_data_structures",
37843786
"rustc_macros",
@@ -3795,22 +3797,18 @@ dependencies = [
37953797
"annotate-snippets 0.11.5",
37963798
"derive_setters",
37973799
"rustc_abi",
3798-
"rustc_ast",
3799-
"rustc_ast_pretty",
38003800
"rustc_data_structures",
38013801
"rustc_error_codes",
38023802
"rustc_error_messages",
38033803
"rustc_fluent_macro",
38043804
"rustc_hashes",
3805-
"rustc_hir",
3805+
"rustc_hir_id",
38063806
"rustc_index",
38073807
"rustc_lexer",
38083808
"rustc_lint_defs",
38093809
"rustc_macros",
38103810
"rustc_serialize",
38113811
"rustc_span",
3812-
"rustc_target",
3813-
"rustc_type_ir",
38143812
"serde",
38153813
"serde_json",
38163814
"termcolor",
@@ -3898,7 +3896,9 @@ dependencies = [
38983896
"rustc_ast",
38993897
"rustc_ast_pretty",
39003898
"rustc_data_structures",
3899+
"rustc_error_messages",
39013900
"rustc_hashes",
3901+
"rustc_hir_id",
39023902
"rustc_index",
39033903
"rustc_macros",
39043904
"rustc_serialize",
@@ -3936,6 +3936,17 @@ dependencies = [
39363936
"tracing",
39373937
]
39383938

3939+
[[package]]
3940+
name = "rustc_hir_id"
3941+
version = "0.0.0"
3942+
dependencies = [
3943+
"rustc_data_structures",
3944+
"rustc_index",
3945+
"rustc_macros",
3946+
"rustc_serialize",
3947+
"rustc_span",
3948+
]
3949+
39393950
[[package]]
39403951
name = "rustc_hir_pretty"
39413952
version = "0.0.0"
@@ -4127,7 +4138,7 @@ dependencies = [
41274138
"rustc_ast",
41284139
"rustc_data_structures",
41294140
"rustc_error_messages",
4130-
"rustc_hir",
4141+
"rustc_hir_id",
41314142
"rustc_macros",
41324143
"rustc_serialize",
41334144
"rustc_span",
@@ -4268,7 +4279,6 @@ dependencies = [
42684279
"rustc_errors",
42694280
"rustc_fluent_macro",
42704281
"rustc_graphviz",
4271-
"rustc_hir",
42724282
"rustc_index",
42734283
"rustc_macros",
42744284
"rustc_middle",
@@ -4647,6 +4657,7 @@ dependencies = [
46474657
"object 0.37.2",
46484658
"rustc_abi",
46494659
"rustc_data_structures",
4660+
"rustc_error_messages",
46504661
"rustc_fs_util",
46514662
"rustc_macros",
46524663
"rustc_serialize",
@@ -4710,7 +4721,6 @@ name = "rustc_traits"
47104721
version = "0.0.0"
47114722
dependencies = [
47124723
"rustc_data_structures",
4713-
"rustc_hir",
47144724
"rustc_infer",
47154725
"rustc_middle",
47164726
"rustc_span",
@@ -4765,6 +4775,7 @@ dependencies = [
47654775
"rustc-hash 2.1.1",
47664776
"rustc_ast_ir",
47674777
"rustc_data_structures",
4778+
"rustc_error_messages",
47684779
"rustc_index",
47694780
"rustc_macros",
47704781
"rustc_serialize",

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,7 @@ Language
17781778
- [Undeprecate lint `unstable_features` and make use of it in the compiler.](https://github.com/rust-lang/rust/pull/118639/)
17791779
- [Make inductive cycles in coherence ambiguous always.](https://github.com/rust-lang/rust/pull/118649/)
17801780
- [Get rid of type-driven traversal in const-eval interning](https://github.com/rust-lang/rust/pull/119044/),
1781-
only as a [future compatiblity lint](https://github.com/rust-lang/rust/pull/122204) for now.
1781+
only as a [future compatibility lint](https://github.com/rust-lang/rust/pull/122204) for now.
17821782
- [Deny braced macro invocations in let-else.](https://github.com/rust-lang/rust/pull/119062/)
17831783

17841784
<a id="1.77.0-Compiler"></a>

compiler/rustc_abi/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bitflags = "2.4.1"
99
rand = { version = "0.9.0", default-features = false, optional = true }
1010
rand_xoshiro = { version = "0.7.0", optional = true }
1111
rustc_data_structures = { path = "../rustc_data_structures", optional = true }
12+
rustc_error_messages = { path = "../rustc_error_messages", optional = true }
1213
rustc_hashes = { path = "../rustc_hashes" }
1314
rustc_index = { path = "../rustc_index", default-features = false }
1415
rustc_macros = { path = "../rustc_macros", optional = true }
@@ -24,6 +25,7 @@ default = ["nightly", "randomize"]
2425
# without depending on rustc_data_structures, rustc_macros and rustc_serialize
2526
nightly = [
2627
"dep:rustc_data_structures",
28+
"dep:rustc_error_messages",
2729
"dep:rustc_macros",
2830
"dep:rustc_serialize",
2931
"dep:rustc_span",

compiler/rustc_abi/src/extern_abi.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ impl StableOrd for ExternAbi {
223223
const THIS_IMPLEMENTATION_HAS_BEEN_TRIPLE_CHECKED: () = ();
224224
}
225225

226+
#[cfg(feature = "nightly")]
227+
rustc_error_messages::into_diag_arg_using_display!(ExternAbi);
228+
226229
impl ExternAbi {
227230
/// An ABI "like Rust"
228231
///

compiler/rustc_ast/src/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@ impl FnRetTy {
31373137
#[derive(Clone, Copy, PartialEq, Encodable, Decodable, Debug, Walkable)]
31383138
pub enum Inline {
31393139
Yes,
3140-
No,
3140+
No { had_parse_error: Result<(), ErrorGuaranteed> },
31413141
}
31423142

31433143
/// Module item kind.
@@ -3147,7 +3147,7 @@ pub enum ModKind {
31473147
/// or with definition outlined to a separate file `mod foo;` and already loaded from it.
31483148
/// The inner span is from the first token past `{` to the last token until `}`,
31493149
/// or from the first to the last token in the loaded file.
3150-
Loaded(ThinVec<Box<Item>>, Inline, ModSpans, Result<(), ErrorGuaranteed>),
3150+
Loaded(ThinVec<Box<Item>>, Inline, ModSpans),
31513151
/// Module with definition outlined to a separate file `mod foo;` but not yet loaded from it.
31523152
Unloaded,
31533153
}

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
251251
ItemKind::Mod(_, ident, mod_kind) => {
252252
let ident = self.lower_ident(*ident);
253253
match mod_kind {
254-
ModKind::Loaded(items, _, spans, _) => {
254+
ModKind::Loaded(items, _, spans) => {
255255
hir::ItemKind::Mod(ident, self.lower_mod(items, spans))
256256
}
257257
ModKind::Unloaded => panic!("`mod` items should have been loaded by now"),

compiler/rustc_ast_passes/messages.ftl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ ast_passes_abi_must_not_have_return_type=
2020
.note = functions with the {$abi} ABI cannot have a return type
2121
.help = remove the return type
2222
23+
ast_passes_abi_x86_interrupt =
24+
invalid signature for `extern "x86-interrupt"` function
25+
.note = functions with the "x86-interrupt" ABI must be have either 1 or 2 parameters (but found {$param_count})
26+
2327
ast_passes_assoc_const_without_body =
2428
associated constant in `impl` without body
2529
.suggestion = provide a definition for the constant

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,17 @@ impl<'a> AstValidator<'a> {
405405
if let InterruptKind::X86 = interrupt_kind {
406406
// "x86-interrupt" is special because it does have arguments.
407407
// FIXME(workingjubilee): properly lint on acceptable input types.
408+
let inputs = &sig.decl.inputs;
409+
let param_count = inputs.len();
410+
if !matches!(param_count, 1 | 2) {
411+
let mut spans: Vec<Span> =
412+
inputs.iter().map(|arg| arg.span).collect();
413+
if spans.is_empty() {
414+
spans = vec![sig.span];
415+
}
416+
self.dcx().emit_err(errors::AbiX86Interrupt { spans, param_count });
417+
}
418+
408419
if let FnRetTy::Ty(ref ret_ty) = sig.decl.output
409420
&& match &ret_ty.kind {
410421
TyKind::Never => false,
@@ -1169,7 +1180,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
11691180
self.dcx().emit_err(errors::UnsafeItem { span, kind: "module" });
11701181
}
11711182
// Ensure that `path` attributes on modules are recorded as used (cf. issue #35584).
1172-
if !matches!(mod_kind, ModKind::Loaded(_, Inline::Yes, _, _))
1183+
if !matches!(mod_kind, ModKind::Loaded(_, Inline::Yes, _))
11731184
&& !attr::contains_name(&item.attrs, sym::path)
11741185
{
11751186
self.check_mod_file_item_asciionly(*ident);

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,3 +891,12 @@ pub(crate) struct AbiMustNotHaveReturnType {
891891
pub span: Span,
892892
pub abi: ExternAbi,
893893
}
894+
895+
#[derive(Diagnostic)]
896+
#[diag(ast_passes_abi_x86_interrupt)]
897+
#[note]
898+
pub(crate) struct AbiX86Interrupt {
899+
#[primary_span]
900+
pub spans: Vec<Span>,
901+
pub param_count: usize,
902+
}

0 commit comments

Comments
 (0)