Commit Graph

339787 Commits

Author SHA1 Message Date
Folkert de Vries
fcddd10cfc s390x: use funnel shift 2026-09-20 15:03:16 +02:00
Folkert de Vries
655ec5ad3a Merge pull request #2222 from adamgemmell/dev/adagem01/cargo-lints
Fix new Cargo lints
2026-09-13 23:23:33 +00:00
Folkert de Vries
aa1e431d34 Merge pull request #2220 from adamgemmell/dev/adagem01/josh-sync-fmt
Run cargo fmt on JOSH syncs
2026-09-13 15:35:49 +00:00
Adam Gemmell
a5b1c3cb17 Merge pull request #2217 from RalfJung/vector-shift-codegen
Revert "Use SIMD intrinsics for vector shifts"
2026-09-09 14:23:16 +00:00
Adam Gemmell
dce8dd2fe2 Fix "unused dependency" 2026-09-09 14:51:34 +01:00
Adam Gemmell
89e9fe135e Fix "package.homepage is redundant with package.repository" 2026-09-09 14:15:03 +01:00
Adam Gemmell
cfc12ac04f Fix "explicit package.readme can be inferred" 2026-09-09 14:15:03 +01:00
Ralf Jung
aa62febfad fmt 2026-09-09 13:51:55 +02:00
Ralf Jung
39333b94dd de-constify methods that depended on the vector shift ones 2026-09-09 13:51:55 +02:00
Ralf Jung
dd13995fa2 Revert "Use SIMD intrinsics for vector shifts"
This reverts commit 102f03d2c410660a45d0231fdafdd347e0d4e77f.
2026-09-09 13:51:55 +02:00
Adam Gemmell
0c4077db76 Run cargo fmt on JOSH syncs 2026-09-09 12:04:06 +01:00
Folkert de Vries
ab89d47fcf Merge pull request #2215 from rust-lang/rustc-pull
Rustc pull update
2026-09-08 17:28:03 +00:00
Adam Gemmell
7cbced258c Update vzipq arm instruction assertions 2026-09-08 14:38:52 +01:00
Adam Gemmell
0016f59536 Run rustfmt 2026-09-07 19:00:53 +01:00
The rustc-josh-sync Cronjob Bot
a3ff62c7ea Merge ref '32d94cc9be3f' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@32d94cc9be
Filtered ref: rust-lang/stdarch@cd16820ce5
Upstream diff: da5114692c...32d94cc9be

This merge was created using https://github.com/rust-lang/josh-sync.
2026-09-07 04:19:32 +00:00
Guillaume Gomez
6c6586a77d Correctly handle dyn trait methods linking for jump to def feature 2026-09-19 22:15:15 +02:00
bors
ca0a6473ff Auto merge of #162625 - JonathanBrouwer:rollup-n0V8kc1, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#162223 (`-Znext-solver` : Abort on the first overflowed obligation in fulfillment)
 - rust-lang/rust#161654 (Eagerly report overflow errors in normalization query)
 - rust-lang/rust#162176 (Clean up some small things related to lint `ambiguous_glob_imported_traits`)
2026-09-11 07:13:44 +00:00
Jonathan Brouwer
65182f17ad Rollup merge of #162176 - fmease:clean-up-ambig-glob-imp-traits, r=adwinwhite
Clean up some small things related to lint `ambiguous_glob_imported_traits`

Cleaning up things I noticed in the vicinity while reviewing PR https://github.com/rust-lang/rust/pull/157968 (which concerns lint `ambiguous_glob_imported_traits` and feature `supertrait_item_shadowing`).

Namely,

1. turning two tuple struct variants into named ones to avoid "anonymous `bool`s"
2. fixing an inaccurate `supertrait_item_shadowing`-specific doc comment
3. applying the rules listed in our [Diagnostic output style guide](https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-output-style-guide) to the diagnostic of lint `ambiguous_glob_imported_traits`

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
2026-09-11 09:00:40 +02:00
Jonathan Brouwer
137500c964 Rollup merge of #161654 - adwinwhite:post-analysis-ice, r=lcnr
Eagerly report overflow errors in normalization query

Fixes https://github.com/rust-lang/rust/issues/161542

We still have rigid opaques in `TypingMode::PostAnalysis` after `PostAnalysisNormalize` pass because we ignore normalization errors in the [`PostAnalysisNormalize` pass](04a3cad16c/compiler/rustc_mir_transform/src/post_analysis_normalize.rs (L66)). We can't handle errors there as we don't have enough information to detect whether they're overflows.

This doesn't cause problems for the old solver because it eagerly emits overflow error in evaluation.
We try to do the same in the next solver.

I don't really know who to assign. Maybe r? @jdonszelmann
cc @lcnr
2026-09-11 09:00:39 +02:00
Jonathan Brouwer
6b55536bd3 Rollup merge of #162223 - adwinwhite:abort-on-fulfillment-overflow, r=lcnr
`-Znext-solver` : Abort on the first overflowed obligation in fulfillment

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/294 cc https://rust-lang.zulipchat.com/#narrow/channel/618216-t-types.2Fcall-for-participation/topic/handling.20overflow.20in.20fulfill/with/621040305

We used to drop all subsequent obligations when one obligation overflows in fulfillment. It means that we don't really prove all obligations even if fulfillment has no pending obligations and returns no error. We now eagerly abort on the first overflowed obligation.

r? @ShoyuVanilla
cc @lcnr
2026-09-11 09:00:38 +02:00
bors
a59b87ab99 Auto merge of #162622 - jhpratt:rollup-F7fv0Yu, r=jhpratt
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#162270 (Update `windows-bindgen` to 0.100.0)
 - rust-lang/rust#162492 (Revert "Rollup merge of rust-lang/rust#157518 - CAD97:xdg_basedir, r=aapoalas")
 - rust-lang/rust#162607 (Basic cleanup in `rustc_transmute`)
 - rust-lang/rust#162619 (Add test for the missing Clone requirement for Cow slices)
 - rust-lang/rust#162172 (mention the opaque when its hidden type cannot be inferred)
 - rust-lang/rust#162514 (Simplify diagnostic levels)
 - rust-lang/rust#162546 (Use lld by default on `loongarch64-unknown-linux-gnu` nightly)
 - rust-lang/rust#162564 (yeet StabilityLevel)
 - rust-lang/rust#162613 (iter::repeat_with, iter::successors, iter::from_fn added as diagnostic items)
 - rust-lang/rust#162616 (regression test for async main diagnostic)
2026-09-11 04:04:07 +00:00
Jacob Pratt
2eaa6012ac Rollup merge of #162616 - malezjaa:add-async-main-regression-test, r=chenyukang
regression test for async main diagnostic

Closes rust-lang/rust#78905
2026-09-11 00:03:14 -04:00
Jacob Pratt
ae7ebc8d39 Rollup merge of #162613 - voodookiidoo:add-iter-diagnostic-items, r=mejrs
iter::repeat_with, iter::successors, iter::from_fn added as diagnostic items

added iter::repeat_with, iter::successors, iter::from_fn as diagnostic items, in order for clippy to be able to register them and work with them. Link to clippy issue: https://github.com/rust-lang/rust-clippy/issues/17719
2026-09-11 00:03:13 -04:00
Jacob Pratt
e8a9e14d02 Rollup merge of #162564 - mejrs:yeet, r=chenyukang
yeet StabilityLevel

It is unused.
2026-09-11 00:03:12 -04:00
Jacob Pratt
b1baa4f7b9 Rollup merge of #162546 - heiher:loong64-gnu-lld-nightly, r=chenyukang
Use lld by default on `loongarch64-unknown-linux-gnu` nightly

This PR makes LLD the default linker for `loongarch64-unknown-linux-gnu` on nightly.

As a prerequisite, it aligns the LoongArch64 Linux `LOAD` segment layout of LLD and other GNU-compatible linkers with GNU ld. This keeps the layout consistent and allows Linux to make better use of file-backed PMD mappings.

The LLD default is initially limited to nightly to allow some soak time before rolling it out to beta and stable.

To opt out of using LLD, `RUSTFLAGS="-Clinker-features=-lld"` would be used. To opt out of using rust-lld, falling back to the LLD installed on the system, `RUSTFLAGS="-Clink-self-contained=-linker"` would be used.
2026-09-11 00:03:11 -04:00
Jacob Pratt
d971af8b59 Rollup merge of #162514 - nnethercote:simplify-diag-Levels, r=oli-obk
Simplify diagnostic levels

This PR separates diagnostic levels from subdiagnostic levels and does a few preliminary cleanups. Details in individual commits.

r? @oli-obk
2026-09-11 00:03:10 -04:00
Jacob Pratt
8abb416b29 Rollup merge of #162172 - Albab-Hasan:opaque-hidden-type-inference-note, r=chenyukang
mention the opaque when its hidden type cannot be inferred

when the hidden type of an opaque was never constrained, typeck reported `E0282` with only the shared cannot infer type label. nothing in the output said an opaque was involved, so the error read like an ordinary local inference failure.

the unconstrained hidden type arm now adds a note naming the opaque as the source of the ambiguity.

fixes https://github.com/rust-lang/rust/issues/146231

r? @lcnr
2026-09-11 00:03:09 -04:00
Jacob Pratt
0180298a84 Rollup merge of #162619 - chenyukang:yukang-fix-141241-cow-clone-diagnostic-test, r=jieyouxu
Add test for the missing Clone requirement for Cow slices

Fixes rust-lang/rust#141241
2026-09-11 00:03:08 -04:00
Jacob Pratt
8021397858 Rollup merge of #162607 - joshlf:transmute-cleanup, r=jswrenn
Basic cleanup in `rustc_transmute`

The content of this PR was authored by an LLM.

r? @jswrenn
2026-09-11 00:03:07 -04:00
Jacob Pratt
6036ee7658 Rollup merge of #162492 - CAD97:rm-xdg, r=ChrisDenton
Revert "Rollup merge of #157518 - CAD97:xdg_basedir, r=aapoalas"

This reverts commit ac8006482d, reversing changes made to 8d6b38095e.

<!-- homu-ignore:start -->

- https://github.com/rust-lang/rust/issues/157515 is superseded
- This includes just the revert that's the first commit in https://github.com/rust-lang/rust/pull/158936
2026-09-11 00:03:06 -04:00
Jacob Pratt
4e1c7f9f55 Rollup merge of #162270 - ChrisDenton:winagain, r=clarfonthey
Update `windows-bindgen` to 0.100.0

This release represents a major change in the way bindings are generated. See https://github.com/microsoft/windows-rs/issues/4867 for details.

In short, it now more directly follows the C headers. For the standard library's purposes this is mostly reflected in relatively minor type changes or with some `const` pointers becoming `mut`.

There is however one big change that affects a lot of types. In the headers there are a lot of `#define`s like this:

```c
#define GENERIC_READ                     (0x80000000L)
#define GENERIC_WRITE                    (0x40000000L)
```

These are constants for the access mode. In this case they're explicitly declared as `L` (aka signed long) integer types (in other cases there's no type at all). However, this conflicts with how access mode constants are actually used. E.g., see `CreateFileW`:

```c
WINBASEAPI
HANDLE
WINAPI
CreateFileW(
    _In_ LPCWSTR lpFileName,
    _In_ DWORD dwDesiredAccess,
    _In_ DWORD dwShareMode,
    _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
    _In_ DWORD dwCreationDisposition,
    _In_ DWORD dwFlagsAndAttributes,
    _In_opt_ HANDLE hTemplateFile
    );
```

Here `dwDesiredAccess` is a `DWORD`, which in rust equates to `u32`. The constant being signed but the usage being unsigned is not a problem for C/C++. They will happily convert between types at the drop of a hat. Rust however is stricter, as you know.

The old metadata used by `windows-bindgen` tried to try to fixup this mismatch but the new one goes strictly by what can be inferred from the headers.  The hope in the future is that the headers themselves will be updated so better bindings can be directly derived from them.
2026-09-11 00:03:06 -04:00
Adwin White
96536dddaa eagerly report overflow errors 2026-09-11 10:01:10 +08:00
malezjaa
01fd255335 regression test for async main diagnostic 2026-09-11 00:19:01 +02:00
Артём
98d3e1bd32 Update library/core/src/iter/sources/repeat_with.rs
item_name fix

Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
2026-09-11 02:39:00 +05:00
Chris Denton
d45c710149 Remove unnecessary manual bindings
Mingw used to have an incorrect import library for the synchronization functions `WaitOnAddress`, `WakeByAddressSingle` and `WakeByAddressAll`. This was fixed a long time ago and our windows-gnu targets require a much newer mingw in any case.
2026-09-10 21:24:00 +00:00
Chris Denton
fc4de336c5 Use new windows bindings 2026-09-10 21:23:52 +00:00
bors
9e9544da4c Auto merge of #162612 - JonathanBrouwer:rollup-Ma0hPul, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#161334 (Fix soundness issues in std::sys::pal::sgx::waitqueue::unsafe_list)
 - rust-lang/rust#162346 (rustdoc: add missing CCI union logic)
 - rust-lang/rust#162273 (doc: replace `exceeding_bitshifts` with `arithmetic_overflow`)
 - rust-lang/rust#162539 (Update wasip2/wasip3 libstd crate dependencies)
 - rust-lang/rust#162542 (Gate ELF code in metadata.rs for ELF only)
 - rust-lang/rust#162604 (Update windows-gnu support docs)
2026-09-10 21:17:34 +00:00
voodookiidoo
23b52a6a18 iter::from_fn added as diagnostic items (requiered for clippy analysis) 2026-09-11 02:00:34 +05:00
Nicholas Nethercote
6331ab69b4 Introduce Sublevel for errors
Currently `Level` is used for both diagnostics and subdiagnostics. But
both diagnostics and subdiagnostics only use some of the levels. This
commit introduces `Sublevel` to tighten up the representation and
prevent impossible combinations.
2026-09-11 06:46:46 +10:00
Nicholas Nethercote
a956ff03c6 Tweak a use item
Use the `FatalError` re-export from `rustc_errors` instead of
`rustc_span`, because that's what's normally done.
2026-09-11 06:44:47 +10:00
Nicholas Nethercote
996ef5d739 Replace a format_diag_messages use
When there's a single message, `format_diag_message` suffices.
2026-09-11 06:41:29 +10:00
Nicholas Nethercote
025e029824 Reduce unnecessary Cow use in error formatting
`format_diag_messages` always constructs a `String`, so it can just
return that. This simplifies various call sites.
2026-09-11 06:41:29 +10:00
Nicholas Nethercote
63fddb3657 Remove Style::HeaderMsg
It has a single use, where it is passed in to `format_diag_messages`
which then discards it. So that use can be replaced with
`Style::NoStyle`.
2026-09-11 06:41:29 +10:00
Nicholas Nethercote
7bc87d508d Remove most Style variants
These are dead since the old emitter was removed in Jan 2026
(3ccabc6a8d).

Also removed: `BRIGHT_BLUE`, `Level::color`, and a couple of `level`
fn parameters.
2026-09-11 06:41:29 +10:00
voodookiidoo
b760816070 iter::repeate_with and iter::successors added as diagnostic items (requiered for clippy analysis) 2026-09-11 01:37:53 +05:00
Jonathan Brouwer
013f1e3eaf Rollup merge of #162604 - mati865:update-windows-gnu-docs, r=hanna-kruppe
Update windows-gnu support docs

Followup to rust-lang/rust#161681.
2026-09-10 22:34:01 +02:00
Jonathan Brouwer
3532a4cefb Rollup merge of #162542 - xingxue-ibm:gate-elf-code-for-elf, r=khyperia
Gate ELF code in metadata.rs for ELF only

This PR gates ELF specific code for `BinaryFormat::Elf`. With this change, fallback for PowerPC64 on AIX is no longer needed.

---------

Assisted-by: IBM Bob
The issue was discovered by IBM Bob while checking changes for other things, and I personally verified the bug. Although the fix is trivial, I ran it through IBM Bob to make sure I wasn’t missing anything.
2026-09-10 22:34:00 +02:00
Jonathan Brouwer
02056c6f40 Rollup merge of #162539 - alexcrichton:update-wit-bindgen-deps, r=ChrisDenton
Update wasip2/wasip3 libstd crate dependencies

Picks up the latest version of the `wit-bindgen` dependency which has improved compatibility for `wasm32-wasip3`.
2026-09-10 22:33:59 +02:00
Jonathan Brouwer
9de53713ae Rollup merge of #162273 - chiang03:main, r=Enselic
doc: replace `exceeding_bitshifts` with `arithmetic_overflow`

lint `exceeding_bitshifts` has been merged into `arithmetic_overflow` in PR rust-lang/rust#69185
2026-09-10 22:33:58 +02:00
Jonathan Brouwer
19f7664b1c Rollup merge of #162346 - notriddle:rustdoc-merge-type, r=lolbinarycat,GuillaumeGomez
rustdoc: add missing CCI union logic

This fixes a bug that was found where `PathBuf` didn't show up in the standard library search results, because the crate that defined it (libstd) was merged into a crate that already had a path entry in its search index (libproc_macro).

Fixes https://github.com/rust-lang/rust/issues/162334
2026-09-10 22:33:57 +02:00