Skip to content

Commit 0fedd40

Browse files
authored
Merge branch 'rust-lang:main' into map-diagnostics-fix
2 parents 2371906 + 5d04477 commit 0fedd40

1,441 files changed

Lines changed: 26226 additions & 24735 deletions

File tree

Some content is hidden

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

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ the Zulip stream is the best place to *ask* for help.
1010

1111
Documentation for contributing to the compiler or tooling is located in the [Guide to Rustc
1212
Development][rustc-dev-guide], commonly known as the [rustc-dev-guide]. Documentation for the
13-
standard library in the [Standard library developers Guide][std-dev-guide], commonly known as the [std-dev-guide].
13+
standard library is in the [Standard library developers Guide][std-dev-guide], commonly known as the [std-dev-guide].
1414

1515
## Making changes to subtrees and submodules
1616

Cargo.lock

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3539,6 +3539,7 @@ dependencies = [
35393539
"rustc_abi",
35403540
"rustc_ast",
35413541
"rustc_ast_pretty",
3542+
"rustc_data_structures",
35423543
"rustc_errors",
35433544
"rustc_feature",
35443545
"rustc_hir",
@@ -3571,7 +3572,6 @@ dependencies = [
35713572
"rustc_abi",
35723573
"rustc_data_structures",
35733574
"rustc_errors",
3574-
"rustc_fluent_macro",
35753575
"rustc_graphviz",
35763576
"rustc_hir",
35773577
"rustc_index",
@@ -3687,7 +3687,6 @@ dependencies = [
36873687
"serde_json",
36883688
"smallvec",
36893689
"tempfile",
3690-
"thin-vec",
36913690
"thorin-dwp",
36923691
"tracing",
36933692
"wasm-encoder 0.219.2",
@@ -3704,7 +3703,6 @@ dependencies = [
37043703
"rustc_ast",
37053704
"rustc_data_structures",
37063705
"rustc_errors",
3707-
"rustc_fluent_macro",
37083706
"rustc_hir",
37093707
"rustc_index",
37103708
"rustc_infer",
@@ -3771,7 +3769,6 @@ dependencies = [
37713769
"rustc_abi",
37723770
"rustc_ast",
37733771
"rustc_ast_pretty",
3774-
"rustc_borrowck",
37753772
"rustc_codegen_ssa",
37763773
"rustc_const_eval",
37773774
"rustc_data_structures",
@@ -3791,13 +3788,11 @@ dependencies = [
37913788
"rustc_mir_build",
37923789
"rustc_mir_transform",
37933790
"rustc_parse",
3794-
"rustc_passes",
37953791
"rustc_public",
37963792
"rustc_resolve",
37973793
"rustc_session",
37983794
"rustc_span",
37993795
"rustc_target",
3800-
"rustc_trait_selection",
38013796
"serde_json",
38023797
"shlex",
38033798
"tracing",
@@ -3892,19 +3887,6 @@ dependencies = [
38923887
"serde_json",
38933888
]
38943889

3895-
[[package]]
3896-
name = "rustc_fluent_macro"
3897-
version = "0.0.0"
3898-
dependencies = [
3899-
"annotate-snippets 0.11.5",
3900-
"fluent-bundle",
3901-
"fluent-syntax",
3902-
"proc-macro2",
3903-
"quote",
3904-
"syn 2.0.110",
3905-
"unic-langid",
3906-
]
3907-
39083890
[[package]]
39093891
name = "rustc_fs_util"
39103892
version = "0.0.0"
@@ -3959,7 +3941,6 @@ dependencies = [
39593941
"rustc_data_structures",
39603942
"rustc_errors",
39613943
"rustc_feature",
3962-
"rustc_fluent_macro",
39633944
"rustc_hir",
39643945
"rustc_index",
39653946
"rustc_infer",
@@ -4112,7 +4093,6 @@ dependencies = [
41124093
"rustc_passes",
41134094
"rustc_privacy",
41144095
"rustc_query_impl",
4115-
"rustc_query_system",
41164096
"rustc_resolve",
41174097
"rustc_session",
41184098
"rustc_span",
@@ -4148,7 +4128,6 @@ dependencies = [
41484128
"rustc_data_structures",
41494129
"rustc_errors",
41504130
"rustc_feature",
4151-
"rustc_fluent_macro",
41524131
"rustc_hir",
41534132
"rustc_index",
41544133
"rustc_infer",
@@ -4246,6 +4225,7 @@ dependencies = [
42464225
"bitflags",
42474226
"either",
42484227
"gsgdt",
4228+
"parking_lot",
42494229
"polonius-engine",
42504230
"rustc_abi",
42514231
"rustc_apfloat",
@@ -4286,7 +4266,6 @@ dependencies = [
42864266
"rustc_ast",
42874267
"rustc_data_structures",
42884268
"rustc_errors",
4289-
"rustc_fluent_macro",
42904269
"rustc_hir",
42914270
"rustc_index",
42924271
"rustc_infer",
@@ -4388,7 +4367,6 @@ dependencies = [
43884367
"rustc_data_structures",
43894368
"rustc_errors",
43904369
"rustc_feature",
4391-
"rustc_fluent_macro",
43924370
"rustc_index",
43934371
"rustc_lexer",
43944372
"rustc_macros",
@@ -4421,7 +4399,6 @@ dependencies = [
44214399
"rustc_errors",
44224400
"rustc_expand",
44234401
"rustc_feature",
4424-
"rustc_fluent_macro",
44254402
"rustc_hir",
44264403
"rustc_index",
44274404
"rustc_macros",
@@ -4515,6 +4492,7 @@ name = "rustc_query_impl"
45154492
version = "0.0.0"
45164493
dependencies = [
45174494
"measureme",
4495+
"rustc_abi",
45184496
"rustc_data_structures",
45194497
"rustc_errors",
45204498
"rustc_hashes",
@@ -4524,30 +4502,27 @@ dependencies = [
45244502
"rustc_middle",
45254503
"rustc_query_system",
45264504
"rustc_serialize",
4505+
"rustc_session",
45274506
"rustc_span",
4507+
"rustc_thread_pool",
45284508
"tracing",
45294509
]
45304510

45314511
[[package]]
45324512
name = "rustc_query_system"
45334513
version = "0.0.0"
45344514
dependencies = [
4535-
"parking_lot",
45364515
"rustc_abi",
45374516
"rustc_ast",
45384517
"rustc_data_structures",
45394518
"rustc_errors",
45404519
"rustc_feature",
4541-
"rustc_hashes",
45424520
"rustc_hir",
4543-
"rustc_index",
45444521
"rustc_macros",
45454522
"rustc_serialize",
45464523
"rustc_session",
45474524
"rustc_span",
4548-
"rustc_thread_pool",
45494525
"smallvec",
4550-
"tracing",
45514526
]
45524527

45534528
[[package]]
@@ -4723,7 +4698,6 @@ dependencies = [
47234698
"rustc_ast",
47244699
"rustc_data_structures",
47254700
"rustc_errors",
4726-
"rustc_fluent_macro",
47274701
"rustc_hir",
47284702
"rustc_infer",
47294703
"rustc_macros",
@@ -5585,7 +5559,6 @@ dependencies = [
55855559
"build_helper",
55865560
"cargo_metadata 0.21.0",
55875561
"clap",
5588-
"fluent-syntax",
55895562
"globset",
55905563
"ignore",
55915564
"miropt-test-tools",

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ itself back on after some time).
233233

234234
### MSVC
235235

236-
MSVC builds of Rust additionally requires an installation of:
236+
MSVC builds of Rust additionally require an installation of:
237237

238238
- Visual Studio 2022 (or later) build tools so `rustc` can use its linker. Older
239239
Visual Studio versions such as 2019 *may* work but aren't actively tested.

RELEASES.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Version 1.93.1 (2026-02-12)
2+
===========================
3+
4+
<a id="1.93.1"></a>
5+
6+
- [Don't try to recover keyword as non-keyword identifier](https://github.com/rust-lang/rust/pull/150590), fixing an ICE that especially [affected rustfmt](https://github.com/rust-lang/rustfmt/issues/6739).
7+
- [Fix `clippy::panicking_unwrap` false-positive on field access with implicit deref](https://github.com/rust-lang/rust-clippy/pull/16196).
8+
- [Revert "Update wasm-related dependencies in CI"](https://github.com/rust-lang/rust/pull/152259), fixing file descriptor leaks on the `wasm32-wasip2` target.
9+
110
Version 1.93.0 (2026-01-22)
211
==========================
312

@@ -1546,7 +1555,7 @@ Compatibility Notes
15461555
- [Check well-formedness of the source type's signature in fn pointer casts.](https://github.com/rust-lang/rust/pull/129021) This partly closes a soundness hole that comes when casting a function item to function pointer
15471556
- [Use equality instead of subtyping when resolving type dependent paths.](https://github.com/rust-lang/rust/pull/129073)
15481557
- Linking on macOS now correctly includes Rust's default deployment target. Due to a linker bug, you might have to pass `MACOSX_DEPLOYMENT_TARGET` or fix your `#[link]` attributes to point to the correct frameworks. See <https://github.com/rust-lang/rust/pull/129369>.
1549-
- [Rust will now correctly raise an error for `repr(Rust)` written on non-`struct`/`enum`/`union` items, since it previous did not have any effect.](https://github.com/rust-lang/rust/pull/129422)
1558+
- [Rust will now correctly raise an error for `repr(Rust)` written on non-`struct`/`enum`/`union` items, since it previously did not have any effect.](https://github.com/rust-lang/rust/pull/129422)
15501559
- The future incompatibility lint `deprecated_cfg_attr_crate_type_name` [has been made into a hard error](https://github.com/rust-lang/rust/pull/129670). It was used to deny usage of `#![crate_type]` and `#![crate_name]` attributes in `#![cfg_attr]`, which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion.
15511560
Users can use `--crate-type` instead of `#![cfg_attr(..., crate_type = "...")]` and `--crate-name` instead of `#![cfg_attr(..., crate_name = "...")]` when running `rustc`/`cargo rustc` on the command line.
15521561
Use of those two attributes outside of `#![cfg_attr]` continue to be fully supported.
@@ -1722,7 +1731,7 @@ Cargo
17221731
Compatibility Notes
17231732
-------------------
17241733
- We now [disallow setting some built-in cfgs via the command-line](https://github.com/rust-lang/rust/pull/126158) with the newly added [`explicit_builtin_cfgs_in_flags`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#explicit-builtin-cfgs-in-flags) lint in order to prevent incoherent state, eg. `windows` cfg active but target is Linux based. The appropriate [`rustc` flag](https://doc.rust-lang.org/rustc/command-line-arguments.html) should be used instead.
1725-
- The standard library has a new implementation of `binary_search` which is significantly improves performance ([#128254](https://github.com/rust-lang/rust/pull/128254)). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.
1734+
- The standard library has a new implementation of `binary_search` which significantly improves performance ([#128254](https://github.com/rust-lang/rust/pull/128254)). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.
17261735
- [illumos/Solaris now sets `MSG_NOSIGNAL` when writing to sockets](https://github.com/rust-lang/rust/pull/128259). This avoids killing the process with SIGPIPE when writing to a closed socket, which matches the existing behavior on other UNIX targets.
17271736
- [Removes a problematic hack that always passed the --whole-archive linker flag for tests, which may cause linker errors for code accidentally relying on it.](https://github.com/rust-lang/rust/pull/128400)
17281737
- The WebAssembly target features `multivalue` and `reference-types` are now
@@ -1872,7 +1881,7 @@ These changes do not affect any public interfaces of Rust, but they represent
18721881
significant improvements to the performance or internals of rustc and related
18731882
tools.
18741883

1875-
- [Add a Rust-for Linux `auto` CI job to check kernel builds.](https://github.com/rust-lang/rust/pull/125209/)
1884+
- [Add a Rust-for-Linux `auto` CI job to check kernel builds.](https://github.com/rust-lang/rust/pull/125209/)
18761885

18771886
Version 1.80.1 (2024-08-08)
18781887
===========================
@@ -4510,7 +4519,7 @@ Compatibility Notes
45104519
saturating to `0` instead][89926]. In the real world the panic happened mostly
45114520
on platforms with buggy monotonic clock implementations rather than catching
45124521
programming errors like reversing the start and end times. Such programming
4513-
errors will now results in `0` rather than a panic.
4522+
errors will now result in `0` rather than a panic.
45144523
- In a future release we're planning to increase the baseline requirements for
45154524
the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love
45164525
your feedback in [PR #95026][95026].

compiler/rustc_abi/src/callconv/reg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ impl Reg {
3535

3636
reg_ctor!(f32, Float, 32);
3737
reg_ctor!(f64, Float, 64);
38+
reg_ctor!(f128, Float, 128);
3839
}
3940

4041
impl Reg {

compiler/rustc_abi/src/layout/ty.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,19 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
290290
/// function call isn't allowed (a.k.a. `va_list`).
291291
///
292292
/// This function handles transparent types automatically.
293-
pub fn pass_indirectly_in_non_rustic_abis<C>(mut self, cx: &C) -> bool
293+
pub fn pass_indirectly_in_non_rustic_abis<C>(self, cx: &C) -> bool
294+
where
295+
Ty: TyAbiInterface<'a, C> + Copy,
296+
{
297+
let base = self.peel_transparent_wrappers(cx);
298+
Ty::is_pass_indirectly_in_non_rustic_abis_flag_set(base)
299+
}
300+
301+
/// Recursively peel away transparent wrappers, returning the inner value.
302+
///
303+
/// The return value is not `repr(transparent)` and/or does
304+
/// not have a non-1zst field.
305+
pub fn peel_transparent_wrappers<C>(mut self, cx: &C) -> Self
294306
where
295307
Ty: TyAbiInterface<'a, C> + Copy,
296308
{
@@ -300,7 +312,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
300312
self = field;
301313
}
302314

303-
Ty::is_pass_indirectly_in_non_rustic_abis_flag_set(self)
315+
self
304316
}
305317

306318
/// Finds the one field that is not a 1-ZST.

compiler/rustc_abi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// tidy-alphabetical-start
2+
#![cfg_attr(all(feature = "nightly", bootstrap, test), feature(assert_matches))]
23
#![cfg_attr(feature = "nightly", allow(internal_features))]
3-
#![cfg_attr(feature = "nightly", feature(assert_matches))]
44
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
55
#![cfg_attr(feature = "nightly", feature(step_trait))]
66
// tidy-alphabetical-end

compiler/rustc_arena/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![cfg_attr(test, feature(test))]
1414
#![deny(unsafe_op_in_unsafe_fn)]
1515
#![doc(test(no_crate_inject, attr(deny(warnings), allow(internal_features))))]
16-
#![feature(core_intrinsics)]
1716
#![feature(decl_macro)]
1817
#![feature(dropck_eyepatch)]
1918
#![feature(never_type)]
@@ -26,7 +25,7 @@ use std::cell::{Cell, RefCell};
2625
use std::marker::PhantomData;
2726
use std::mem::{self, MaybeUninit};
2827
use std::ptr::{self, NonNull};
29-
use std::{cmp, intrinsics, slice};
28+
use std::{cmp, hint, slice};
3029

3130
use smallvec::SmallVec;
3231

@@ -452,7 +451,7 @@ impl DroplessArena {
452451
let bytes = align_up(layout.size(), DROPLESS_ALIGNMENT);
453452

454453
// Tell LLVM that `end` is aligned to DROPLESS_ALIGNMENT.
455-
unsafe { intrinsics::assume(end == align_down(end, DROPLESS_ALIGNMENT)) };
454+
unsafe { hint::assert_unchecked(end == align_down(end, DROPLESS_ALIGNMENT)) };
456455

457456
if let Some(sub) = end.checked_sub(bytes) {
458457
let new_end = align_down(sub, layout.align());

compiler/rustc_ast/src/ast.rs

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,7 @@ impl Pat {
656656
// A tuple pattern `(P0, .., Pn)` can be reparsed as `(T0, .., Tn)`
657657
// assuming `T0` to `Tn` are all syntactically valid as types.
658658
PatKind::Tuple(pats) => {
659-
let mut tys = ThinVec::with_capacity(pats.len());
660-
// FIXME(#48994) - could just be collected into an Option<Vec>
661-
for pat in pats {
662-
tys.push(pat.to_ty()?);
663-
}
659+
let tys = pats.iter().map(|pat| pat.to_ty()).collect::<Option<ThinVec<_>>>()?;
664660
TyKind::Tup(tys)
665661
}
666662
_ => return None,
@@ -3873,27 +3869,44 @@ pub struct ConstItem {
38733869
pub ident: Ident,
38743870
pub generics: Generics,
38753871
pub ty: Box<Ty>,
3876-
pub rhs: Option<ConstItemRhs>,
3872+
pub rhs_kind: ConstItemRhsKind,
38773873
pub define_opaque: Option<ThinVec<(NodeId, Path)>>,
38783874
}
38793875

38803876
#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
3881-
pub enum ConstItemRhs {
3882-
TypeConst(AnonConst),
3883-
Body(Box<Expr>),
3877+
pub enum ConstItemRhsKind {
3878+
Body { rhs: Option<Box<Expr>> },
3879+
TypeConst { rhs: Option<AnonConst> },
38843880
}
38853881

3886-
impl ConstItemRhs {
3887-
pub fn span(&self) -> Span {
3888-
self.expr().span
3882+
impl ConstItemRhsKind {
3883+
pub fn new_body(rhs: Box<Expr>) -> Self {
3884+
Self::Body { rhs: Some(rhs) }
38893885
}
38903886

3891-
pub fn expr(&self) -> &Expr {
3887+
pub fn span(&self) -> Option<Span> {
3888+
Some(self.expr()?.span)
3889+
}
3890+
3891+
pub fn expr(&self) -> Option<&Expr> {
38923892
match self {
3893-
ConstItemRhs::TypeConst(anon_const) => &anon_const.value,
3894-
ConstItemRhs::Body(expr) => expr,
3893+
Self::Body { rhs: Some(body) } => Some(&body),
3894+
Self::TypeConst { rhs: Some(anon) } => Some(&anon.value),
3895+
_ => None,
38953896
}
38963897
}
3898+
3899+
pub fn has_expr(&self) -> bool {
3900+
match self {
3901+
Self::Body { rhs: Some(_) } => true,
3902+
Self::TypeConst { rhs: Some(_) } => true,
3903+
_ => false,
3904+
}
3905+
}
3906+
3907+
pub fn is_type_const(&self) -> bool {
3908+
matches!(self, &Self::TypeConst { .. })
3909+
}
38973910
}
38983911

38993912
#[derive(Clone, Encodable, Decodable, Debug, Walkable)]

0 commit comments

Comments
 (0)