Skip to content

Commit 9e8e4af

Browse files
authored
Merge pull request rust-lang#4590 from rust-lang/rustup-2025-09-17
Automatic Rustup
2 parents 4b35fed + 1672251 commit 9e8e4af

File tree

133 files changed

+3421
-2709
lines changed

Some content is hidden

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

133 files changed

+3421
-2709
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ Shohei Wada <[email protected]>
609609
Shotaro Yamada <[email protected]>
610610
611611
Shyam Sundar B <[email protected]>
612+
612613
Simon Barber-Dueck <[email protected]> Simon BD <simon@server>
613614
614615
Simonas Kazlauskas <[email protected]> Simonas Kazlauskas <[email protected]>

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4817,9 +4817,9 @@ dependencies = [
48174817

48184818
[[package]]
48194819
name = "rustfix"
4820-
version = "0.8.1"
4820+
version = "0.8.7"
48214821
source = "registry+https://github.com/rust-lang/crates.io-index"
4822-
checksum = "81864b097046da5df3758fdc6e4822bbb70afa06317e8ca45ea1b51cb8c5e5a4"
4822+
checksum = "82fa69b198d894d84e23afde8e9ab2af4400b2cba20d6bf2b428a8b01c222c5a"
48234823
dependencies = [
48244824
"serde",
48254825
"serde_json",

RELEASES.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,129 @@
1+
Version 1.90 (2025-09-18)
2+
==========================
3+
4+
<a id="1.90-Language"></a>
5+
6+
Language
7+
--------
8+
- [Split up the `unknown_or_malformed_diagnostic_attributes` lint](https://github.com/rust-lang/rust/pull/140717). This lint has been split up into four finer-grained lints, with `unknown_or_malformed_diagnostic_attributes` now being the lint group that contains these lints:
9+
1. `unknown_diagnostic_attributes`: unknown to the current compiler
10+
2. `misplaced_diagnostic_attributes`: placed on the wrong item
11+
3. `malformed_diagnostic_attributes`: malformed attribute syntax or options
12+
4. `malformed_diagnostic_format_literals`: malformed format string literal
13+
- [Allow constants whose final value has references to mutable/external memory, but reject such constants as patterns](https://github.com/rust-lang/rust/pull/140942)
14+
- [Allow volatile access to non-Rust memory, including address 0](https://github.com/rust-lang/rust/pull/141260)
15+
16+
17+
<a id="1.90-Compiler"></a>
18+
19+
Compiler
20+
--------
21+
- [Use `lld` by default on `x86_64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/140525).
22+
- [Tier 3 `musl` targets now link dynamically by default](https://github.com/rust-lang/rust/pull/144410). Affected targets:
23+
- `mips64-unknown-linux-muslabi64`
24+
- `powerpc64-unknown-linux-musl`
25+
- `powerpc-unknown-linux-musl`
26+
- `powerpc-unknown-linux-muslspe`
27+
- `riscv32gc-unknown-linux-musl`
28+
- `s390x-unknown-linux-musl`
29+
- `thumbv7neon-unknown-linux-musleabihf`
30+
31+
32+
<a id="1.90-Platform-Support"></a>
33+
34+
Platform Support
35+
----------------
36+
- [Demote `x86_64-apple-darwin` to Tier 2 with host tools](https://github.com/rust-lang/rust/pull/145252)
37+
38+
39+
Refer to Rust's [platform support page][platform-support-doc]
40+
for more information on Rust's tiered platform support.
41+
42+
[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
43+
44+
<a id="1.90-Libraries"></a>
45+
46+
Libraries
47+
---------
48+
- [Stabilize `u*::{checked,overflowing,saturating,wrapping}_sub_signed`](https://github.com/rust-lang/rust/issues/126043)
49+
- [Allow comparisons between `CStr`, `CString`, and `Cow<CStr>`](https://github.com/rust-lang/rust/pull/137268)
50+
- [Remove some unsized tuple impls since unsized tuples can't be constructed](https://github.com/rust-lang/rust/pull/138340)
51+
- [Set `MSG_NOSIGNAL` for `UnixStream`](https://github.com/rust-lang/rust/pull/140005)
52+
- [`proc_macro::Ident::new` now supports `$crate`.](https://github.com/rust-lang/rust/pull/141996)
53+
- [Guarantee the pointer returned from `Thread::into_raw` has at least 8 bytes of alignment](https://github.com/rust-lang/rust/pull/143859)
54+
55+
56+
<a id="1.90-Stabilized-APIs"></a>
57+
58+
Stabilized APIs
59+
---------------
60+
61+
- [`u{n}::checked_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.checked_sub_signed)
62+
- [`u{n}::overflowing_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.overflowing_sub_signed)
63+
- [`u{n}::saturating_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.saturating_sub_signed)
64+
- [`u{n}::wrapping_sub_signed`](https://doc.rust-lang.org/stable/std/primitive.usize.html#method.wrapping_sub_signed)
65+
- [`impl Copy for IntErrorKind`](https://doc.rust-lang.org/stable/std/num/enum.IntErrorKind.html#impl-Copy-for-IntErrorKind)
66+
- [`impl Hash for IntErrorKind`](https://doc.rust-lang.org/stable/std/num/enum.IntErrorKind.html#impl-Hash-for-IntErrorKind)
67+
- [`impl PartialEq<&CStr> for CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3C%26CStr%3E-for-CStr)
68+
- [`impl PartialEq<CString> for CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3CCString%3E-for-CStr)
69+
- [`impl PartialEq<Cow<CStr>> for CStr`](https://doc.rust-lang.org/stable/std/ffi/struct.CStr.html#impl-PartialEq%3CCow%3C'_,+CStr%3E%3E-for-CStr)
70+
- [`impl PartialEq<&CStr> for CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3C%26CStr%3E-for-CString)
71+
- [`impl PartialEq<CStr> for CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3CCStr%3E-for-CString)
72+
- [`impl PartialEq<Cow<CStr>> for CString`](https://doc.rust-lang.org/stable/std/ffi/struct.CString.html#impl-PartialEq%3CCow%3C'_,+CStr%3E%3E-for-CString)
73+
- [`impl PartialEq<&CStr> for Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3C%26CStr%3E-for-Cow%3C'_,+CStr%3E)
74+
- [`impl PartialEq<CStr> for Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3CCStr%3E-for-Cow%3C'_,+CStr%3E)
75+
- [`impl PartialEq<CString> for Cow<CStr>`](https://doc.rust-lang.org/stable/std/borrow/enum.Cow.html#impl-PartialEq%3CCString%3E-for-Cow%3C'_,+CStr%3E)
76+
77+
78+
These previously stable APIs are now stable in const contexts:
79+
80+
- [`<[T]>::reverse`](https://doc.rust-lang.org/stable/std/primitive.slice.html#method.reverse)
81+
- [`f32::floor`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.floor)
82+
- [`f32::ceil`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.ceil)
83+
- [`f32::trunc`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.trunc)
84+
- [`f32::fract`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.fract)
85+
- [`f32::round`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round)
86+
- [`f32::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f32.html#method.round_ties_even)
87+
- [`f64::floor`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.floor)
88+
- [`f64::ceil`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.ceil)
89+
- [`f64::trunc`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.trunc)
90+
- [`f64::fract`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.fract)
91+
- [`f64::round`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round)
92+
- [`f64::round_ties_even`](https://doc.rust-lang.org/stable/std/primitive.f64.html#method.round_ties_even)
93+
94+
95+
<a id="1.90-Cargo"></a>
96+
97+
Cargo
98+
-----
99+
- [Add `http.proxy-cainfo` config for proxy certs](https://github.com/rust-lang/cargo/pull/15374/)
100+
- [Use `gix` for `cargo package`](https://github.com/rust-lang/cargo/pull/15534/)
101+
- [feat(publish): Stabilize multi-package publishing](https://github.com/rust-lang/cargo/pull/15636/)
102+
103+
<a id="1.90-Rustdoc"></a>
104+
105+
Rustdoc
106+
-----
107+
- [Add ways to collapse all impl blocks](https://github.com/rust-lang/rust/pull/141663). Previously the "Summary" button and "-" keyboard shortcut would never collapse `impl` blocks, now they do when shift is held
108+
- [Display unsafe attributes with `unsafe()` wrappers](https://github.com/rust-lang/rust/pull/143662)
109+
110+
111+
<a id="1.90-Compatibility-Notes"></a>
112+
113+
Compatibility Notes
114+
-------------------
115+
- [Use `lld` by default on `x86_64-unknown-linux-gnu`](https://github.com/rust-lang/rust/pull/140525).
116+
See also <https://blog.rust-lang.org/2025/09/01/rust-lld-on-1.90.0-stable/>.
117+
- [Make `core::iter::Fuse`'s `Default` impl construct `I::default()` internally as promised in the docs instead of always being empty](https://github.com/rust-lang/rust/pull/140985)
118+
- [Set `MSG_NOSIGNAL` for `UnixStream`](https://github.com/rust-lang/rust/pull/140005)
119+
This may change program behavior but results in the same behavior as other primitives (e.g., stdout, network sockets).
120+
Programs relying on signals to terminate them should update handling of sockets to handle errors on write by exiting.
121+
- [On Unix `std::env::home_dir` will use the fallback if the `HOME` environment variable is empty](https://github.com/rust-lang/rust/pull/141840)
122+
- We now [reject unsupported `extern "{abi}"`s consistently in all positions](https://github.com/rust-lang/rust/pull/142134). This primarily affects the use of implementing traits on an `extern "{abi}"` function pointer, like `extern "stdcall" fn()`, on a platform that doesn't support that, like aarch64-unknown-linux-gnu. Direct usage of these unsupported ABI strings by declaring or defining functions was already rejected, so this is only a change for consistency.
123+
- [const-eval: error when initializing a static writes to that static](https://github.com/rust-lang/rust/pull/143084)
124+
- [Check that the `proc_macro_derive` macro has correct arguments when applied to the crate root](https://github.com/rust-lang/rust/pull/143607)
125+
126+
1127
Version 1.89.0 (2025-08-07)
2128
==========================
3129

compiler/rustc_builtin_macros/src/deriving/bounds.rs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -51,43 +51,4 @@ pub(crate) fn expand_deriving_const_param_ty(
5151
};
5252

5353
trait_def.expand(cx, mitem, item, push);
54-
55-
let trait_def = TraitDef {
56-
span,
57-
path: path_std!(marker::UnsizedConstParamTy),
58-
skip_path_as_bound: false,
59-
needs_copy_as_bound_if_packed: false,
60-
additional_bounds: vec![ty::Ty::Path(path_std!(cmp::Eq))],
61-
supports_unions: false,
62-
methods: Vec::new(),
63-
associated_types: Vec::new(),
64-
is_const,
65-
is_staged_api_crate: cx.ecfg.features.staged_api(),
66-
};
67-
68-
trait_def.expand(cx, mitem, item, push);
69-
}
70-
71-
pub(crate) fn expand_deriving_unsized_const_param_ty(
72-
cx: &ExtCtxt<'_>,
73-
span: Span,
74-
mitem: &MetaItem,
75-
item: &Annotatable,
76-
push: &mut dyn FnMut(Annotatable),
77-
is_const: bool,
78-
) {
79-
let trait_def = TraitDef {
80-
span,
81-
path: path_std!(marker::UnsizedConstParamTy),
82-
skip_path_as_bound: false,
83-
needs_copy_as_bound_if_packed: false,
84-
additional_bounds: vec![ty::Ty::Path(path_std!(cmp::Eq))],
85-
supports_unions: false,
86-
methods: Vec::new(),
87-
associated_types: Vec::new(),
88-
is_const,
89-
is_staged_api_crate: cx.ecfg.features.staged_api(),
90-
};
91-
92-
trait_def.expand(cx, mitem, item, push);
9354
}

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) {
129129
Clone: clone::expand_deriving_clone,
130130
Copy: bounds::expand_deriving_copy,
131131
ConstParamTy: bounds::expand_deriving_const_param_ty,
132-
UnsizedConstParamTy: bounds::expand_deriving_unsized_const_param_ty,
133132
Debug: debug::expand_deriving_debug,
134133
Default: default::expand_deriving_default,
135134
Eq: eq::expand_deriving_eq,

compiler/rustc_codegen_llvm/src/asm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
240240
}
241241
InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
242242
constraints.extend_from_slice(&[
243+
"~{fflags}".to_string(),
243244
"~{vtype}".to_string(),
244245
"~{vl}".to_string(),
245246
"~{vxsat}".to_string(),

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use itertools::Itertools as _;
2-
use rustc_abi::{self as abi, FIRST_VARIANT};
2+
use rustc_abi::{self as abi, BackendRepr, FIRST_VARIANT};
33
use rustc_middle::ty::adjustment::PointerCoercion;
44
use rustc_middle::ty::layout::{HasTyCtxt, HasTypingEnv, LayoutOf, TyAndLayout};
55
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
@@ -25,6 +25,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
2525
match *rvalue {
2626
mir::Rvalue::Use(ref operand) => {
2727
let cg_operand = self.codegen_operand(bx, operand);
28+
// Crucially, we do *not* use `OperandValue::Ref` for types with
29+
// `BackendRepr::Scalar | BackendRepr::ScalarPair`. This ensures we match the MIR
30+
// semantics regarding when assignment operators allow overlap of LHS and RHS.
31+
if matches!(
32+
cg_operand.layout.backend_repr,
33+
BackendRepr::Scalar(..) | BackendRepr::ScalarPair(..),
34+
) {
35+
debug_assert!(!matches!(cg_operand.val, OperandValue::Ref(..)));
36+
}
2837
// FIXME: consider not copying constants through stack. (Fixable by codegen'ing
2938
// constants into `OperandValue::Ref`; why don’t we do that yet if we don’t?)
3039
cg_operand.val.store(bx, dest);

compiler/rustc_const_eval/src/interpret/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ where
858858
/// Also, if you use this you are responsible for validating that things get copied at the
859859
/// right type.
860860
#[instrument(skip(self), level = "trace")]
861-
fn copy_op_no_validate(
861+
pub(super) fn copy_op_no_validate(
862862
&mut self,
863863
src: &impl Projectable<'tcx, M::Provenance>,
864864
dest: &impl Writeable<'tcx, M::Provenance>,

compiler/rustc_const_eval/src/interpret/step.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
310310
operands: &IndexSlice<FieldIdx, mir::Operand<'tcx>>,
311311
dest: &PlaceTy<'tcx, M::Provenance>,
312312
) -> InterpResult<'tcx> {
313-
self.write_uninit(dest)?; // make sure all the padding ends up as uninit
314313
let (variant_index, variant_dest, active_field_index) = match *kind {
315314
mir::AggregateKind::Adt(_, variant_index, _, _, active_field_index) => {
316315
let variant_dest = self.project_downcast(dest, variant_index)?;
@@ -346,9 +345,20 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
346345
let field_index = active_field_index.unwrap_or(field_index);
347346
let field_dest = self.project_field(&variant_dest, field_index)?;
348347
let op = self.eval_operand(operand, Some(field_dest.layout))?;
349-
self.copy_op(&op, &field_dest)?;
348+
// We validate manually below so we don't have to do it here.
349+
self.copy_op_no_validate(&op, &field_dest, /*allow_transmute*/ false)?;
350350
}
351-
self.write_discriminant(variant_index, dest)
351+
self.write_discriminant(variant_index, dest)?;
352+
// Validate that the entire thing is valid, and reset padding that might be in between the
353+
// fields.
354+
if M::enforce_validity(self, dest.layout()) {
355+
self.validate_operand(
356+
dest,
357+
M::enforce_validity_recursively(self, dest.layout()),
358+
/*reset_provenance_and_padding*/ true,
359+
)?;
360+
}
361+
interp_ok(())
352362
}
353363

354364
/// Repeats `operand` into the destination. `dest` must have array type, and that type

compiler/rustc_hir/src/lang_items.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ language_item_table! {
370370
CoercePointeeValidated, sym::coerce_pointee_validated, coerce_pointee_validated_trait, Target::Trait, GenericRequirement::Exact(0);
371371

372372
ConstParamTy, sym::const_param_ty, const_param_ty_trait, Target::Trait, GenericRequirement::Exact(0);
373-
UnsizedConstParamTy, sym::unsized_const_param_ty, unsized_const_param_ty_trait, Target::Trait, GenericRequirement::Exact(0);
374373

375374
Poll, sym::Poll, poll, Target::Enum, GenericRequirement::None;
376375
PollReady, sym::Ready, poll_ready_variant, Target::Variant, GenericRequirement::None;

0 commit comments

Comments
 (0)