Skip to content

Commit ad76404

Browse files
authored
Merge pull request rust-lang#4598 from rust-lang/rustup-2025-09-20
Automatic Rustup
2 parents 0dac2f0 + 5c23203 commit ad76404

File tree

652 files changed

+16821
-18744
lines changed

Some content is hidden

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

652 files changed

+16821
-18744
lines changed

Cargo.lock

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
568568

569569
[[package]]
570570
name = "clippy"
571-
version = "0.1.91"
571+
version = "0.1.92"
572572
dependencies = [
573573
"anstream",
574574
"askama",
@@ -595,7 +595,7 @@ dependencies = [
595595

596596
[[package]]
597597
name = "clippy_config"
598-
version = "0.1.91"
598+
version = "0.1.92"
599599
dependencies = [
600600
"clippy_utils",
601601
"itertools",
@@ -618,7 +618,7 @@ dependencies = [
618618

619619
[[package]]
620620
name = "clippy_lints"
621-
version = "0.1.91"
621+
version = "0.1.92"
622622
dependencies = [
623623
"arrayvec",
624624
"cargo_metadata 0.18.1",
@@ -649,7 +649,7 @@ dependencies = [
649649

650650
[[package]]
651651
name = "clippy_utils"
652-
version = "0.1.91"
652+
version = "0.1.92"
653653
dependencies = [
654654
"arrayvec",
655655
"itertools",
@@ -1052,7 +1052,7 @@ dependencies = [
10521052

10531053
[[package]]
10541054
name = "declare_clippy_lint"
1055-
version = "0.1.91"
1055+
version = "0.1.92"
10561056

10571057
[[package]]
10581058
name = "derive-where"
@@ -4242,6 +4242,7 @@ name = "rustc_mir_transform"
42424242
version = "0.0.0"
42434243
dependencies = [
42444244
"either",
4245+
"hashbrown",
42454246
"itertools",
42464247
"rustc_abi",
42474248
"rustc_arena",

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Version 1.90 (2025-09-18)
2-
==========================
1+
Version 1.90.0 (2025-09-18)
2+
===========================
33

44
<a id="1.90-Language"></a>
55

bootstrap.example.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@
325325
# Defaults to the Python interpreter used to execute x.py.
326326
#build.python = "python"
327327

328+
# The path to (or name of) the resource compiler executable to use on Windows.
329+
#build.windows-rc = "rc.exe"
330+
328331
# The path to the REUSE executable to use. Note that REUSE is not required in
329332
# most cases, as our tooling relies on a cached (and shrunk) copy of the
330333
# REUSE output present in the git repository and in our source tarballs.
@@ -859,6 +862,14 @@
859862
# Trigger a `DebugBreak` after an internal compiler error during bootstrap on Windows
860863
#rust.break-on-ice = true
861864

865+
# Set the number of threads for the compiler frontend used during compilation of Rust code (passed to `-Zthreads`).
866+
# The valid options are:
867+
# 0 - Set the number of threads according to the detected number of threads of the host system
868+
# 1 - Use a single thread for compilation of Rust code (the default)
869+
# N - Number of threads used for compilation of Rust code
870+
#
871+
#rust.parallel-frontend-threads = 1
872+
862873
# =============================================================================
863874
# Distribution options
864875
#

compiler/rustc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ features = ['unprefixed_malloc_on_supported_platforms']
3030
check_only = ['rustc_driver_impl/check_only']
3131
jemalloc = ['dep:tikv-jemalloc-sys']
3232
llvm = ['rustc_driver_impl/llvm']
33+
llvm_enzyme = ['rustc_driver_impl/llvm_enzyme']
3334
max_level_info = ['rustc_driver_impl/max_level_info']
3435
rustc_randomized_layouts = ['rustc_driver_impl/rustc_randomized_layouts']
3536
# tidy-alphabetical-end

compiler/rustc_ast_passes/messages.ftl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ ast_passes_body_in_extern = incorrect `{$kind}` inside `extern` block
6464
6565
ast_passes_bound_in_context = bounds on `type`s in {$ctx} have no effect
6666
67-
ast_passes_c_variadic_associated_function = associated functions cannot have a C variable argument list
68-
6967
ast_passes_c_variadic_bad_extern = `...` is not supported for `extern "{$abi}"` functions
7068
.label = `extern "{$abi}"` because of this
7169
.help = only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ impl<'a> AstValidator<'a> {
696696

697697
match fn_ctxt {
698698
FnCtxt::Foreign => return,
699-
FnCtxt::Free => match sig.header.ext {
699+
FnCtxt::Free | FnCtxt::Assoc(_) => match sig.header.ext {
700700
Extern::Implicit(_) => {
701701
if !matches!(sig.header.safety, Safety::Unsafe(_)) {
702702
self.dcx().emit_err(errors::CVariadicMustBeUnsafe {
@@ -726,11 +726,6 @@ impl<'a> AstValidator<'a> {
726726
self.dcx().emit_err(err);
727727
}
728728
},
729-
FnCtxt::Assoc(_) => {
730-
// For now, C variable argument lists are unsupported in associated functions.
731-
let err = errors::CVariadicAssociatedFunction { span: variadic_param.span };
732-
self.dcx().emit_err(err);
733-
}
734729
}
735730
}
736731

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,6 @@ pub(crate) struct ExternItemAscii {
318318
pub block: Span,
319319
}
320320

321-
#[derive(Diagnostic)]
322-
#[diag(ast_passes_c_variadic_associated_function)]
323-
pub(crate) struct CVariadicAssociatedFunction {
324-
#[primary_span]
325-
pub span: Span,
326-
}
327-
328321
#[derive(Diagnostic)]
329322
#[diag(ast_passes_c_variadic_no_extern)]
330323
#[help]

compiler/rustc_attr_parsing/messages.ftl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ attr_parsing_null_on_export = `export_name` may not contain null characters
122122
123123
attr_parsing_null_on_link_section = `link_section` may not contain null characters
124124
125+
attr_parsing_null_on_objc_class = `objc::class!` may not contain null characters
126+
127+
attr_parsing_null_on_objc_selector = `objc::selector!` may not contain null characters
128+
129+
attr_parsing_objc_class_expected_string_literal = `objc::class!` expected a string literal
130+
131+
attr_parsing_objc_selector_expected_string_literal = `objc::selector!` expected a string literal
132+
125133
attr_parsing_repr_ident =
126134
meta item in `repr` must be an identifier
127135

compiler/rustc_attr_parsing/src/attributes/codegen_attrs.rs

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ use rustc_hir::attrs::{CoverageAttrKind, OptimizeAttr, SanitizerSet, UsedBy};
22
use rustc_session::parse::feature_err;
33

44
use super::prelude::*;
5-
use crate::session_diagnostics::{NakedFunctionIncompatibleAttribute, NullOnExport};
5+
use crate::session_diagnostics::{
6+
NakedFunctionIncompatibleAttribute, NullOnExport, NullOnObjcClass, NullOnObjcSelector,
7+
ObjcClassExpectedStringLiteral, ObjcSelectorExpectedStringLiteral,
8+
};
69

710
pub(crate) struct OptimizeParser;
811

@@ -150,6 +153,70 @@ impl<S: Stage> SingleAttributeParser<S> for ExportNameParser {
150153
}
151154
}
152155

156+
pub(crate) struct ObjcClassParser;
157+
158+
impl<S: Stage> SingleAttributeParser<S> for ObjcClassParser {
159+
const PATH: &[rustc_span::Symbol] = &[sym::rustc_objc_class];
160+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
161+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
162+
const ALLOWED_TARGETS: AllowedTargets =
163+
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
164+
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "ClassName");
165+
166+
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
167+
let Some(nv) = args.name_value() else {
168+
cx.expected_name_value(cx.attr_span, None);
169+
return None;
170+
};
171+
let Some(classname) = nv.value_as_str() else {
172+
// `#[rustc_objc_class = ...]` is expected to be used as an implementatioin detail
173+
// inside a standard library macro, but `cx.expected_string_literal` exposes too much.
174+
// Use a custom error message instead.
175+
cx.emit_err(ObjcClassExpectedStringLiteral { span: nv.value_span });
176+
return None;
177+
};
178+
if classname.as_str().contains('\0') {
179+
// `#[rustc_objc_class = ...]` will be converted to a null-terminated string,
180+
// so it may not contain any null characters.
181+
cx.emit_err(NullOnObjcClass { span: nv.value_span });
182+
return None;
183+
}
184+
Some(AttributeKind::ObjcClass { classname, span: cx.attr_span })
185+
}
186+
}
187+
188+
pub(crate) struct ObjcSelectorParser;
189+
190+
impl<S: Stage> SingleAttributeParser<S> for ObjcSelectorParser {
191+
const PATH: &[rustc_span::Symbol] = &[sym::rustc_objc_selector];
192+
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepInnermost;
193+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
194+
const ALLOWED_TARGETS: AllowedTargets =
195+
AllowedTargets::AllowList(&[Allow(Target::ForeignStatic)]);
196+
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "methodName");
197+
198+
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser<'_>) -> Option<AttributeKind> {
199+
let Some(nv) = args.name_value() else {
200+
cx.expected_name_value(cx.attr_span, None);
201+
return None;
202+
};
203+
let Some(methname) = nv.value_as_str() else {
204+
// `#[rustc_objc_selector = ...]` is expected to be used as an implementatioin detail
205+
// inside a standard library macro, but `cx.expected_string_literal` exposes too much.
206+
// Use a custom error message instead.
207+
cx.emit_err(ObjcSelectorExpectedStringLiteral { span: nv.value_span });
208+
return None;
209+
};
210+
if methname.as_str().contains('\0') {
211+
// `#[rustc_objc_selector = ...]` will be converted to a null-terminated string,
212+
// so it may not contain any null characters.
213+
cx.emit_err(NullOnObjcSelector { span: nv.value_span });
214+
return None;
215+
}
216+
Some(AttributeKind::ObjcSelector { methname, span: cx.attr_span })
217+
}
218+
}
219+
153220
#[derive(Default)]
154221
pub(crate) struct NakedParser {
155222
span: Option<Span>,

compiler/rustc_attr_parsing/src/attributes/crate_level.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,12 @@ impl<S: Stage> NoArgsAttributeParser<S> for NoStdParser {
174174
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
175175
const CREATE: fn(Span) -> AttributeKind = AttributeKind::NoStd;
176176
}
177+
178+
pub(crate) struct RustcCoherenceIsCoreParser;
179+
180+
impl<S: Stage> NoArgsAttributeParser<S> for RustcCoherenceIsCoreParser {
181+
const PATH: &[Symbol] = &[sym::rustc_coherence_is_core];
182+
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error;
183+
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::CrateLevel;
184+
const CREATE: fn(Span) -> AttributeKind = AttributeKind::RustcCoherenceIsCore;
185+
}

0 commit comments

Comments
 (0)