Commit Graph

168874 Commits

Author SHA1 Message Date
Boxy Uwu e6b6de40c2 bump version number 2025-12-05 19:33:24 +00:00
Matthias Krüger a43b30c113 Rollup merge of #149671 - RalfJung:interpret-float-min-max, r=mati865
interpret: test SNaN handling of float min/max and update comments

Also see https://github.com/rust-lang/rust/pull/149563.

I also renamed these enum variants so they are not almost identical.
2025-12-05 16:17:13 +01:00
Matthias Krüger 8e46521d0e Rollup merge of #149666 - Zalathar:backend-has-zstd, r=jieyouxu
Add perma-unstable `--print=backend-has-zstd` for use by compiletest

Tests for `-Zdebuginfo-compression=zstd` need to be skipped if LLVM was built without support for zstd compression.

Currently, compiletest relies on messy and fragile heuristics to detect whether the compiler's LLVM was built with zstd support. But the compiler itself already knows whether LLVM has zstd or not, so it's easier for compiletest to just ask the compiler.

---

Originally I was intending for this to be a `--print=debuginfo-compression` flag that would print out a list of values supported by `-Zdebuginfo-compression=`. I got that working locally, but it was more complex than I was happy with (in both rustc and compiletest), so I decided to cut scope and instead add a very narrow perma-unstable print request instead.

There is always a circularity hazard whenever we ask the compiler-under-test for information about how to test it. But in this case, the underlying compiler code is fairly simple, whereas the previous heuristics were inherently messy and unreliable anyway.
2025-12-05 16:17:12 +01:00
bors 97b131c900 Auto merge of #148602 - BoxyUwU:coercion_cleanup_uncontroversial, r=lcnr
misc coercion cleanups and handle safety correctly

r? lcnr

### "remove normalize call"

Fixes rust-lang/rust#132765

If the normalization fails we would sometimes get a `TypeError` containing inference variables created inside of the probe used by coercion. These would then get leaked out causing ICEs in diagnostics logic

### "leak check and lub for closure<->closure coerce-lubs of same defids"

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/233
```rust
fn peculiar() -> impl Fn(u8) -> u8 {
    return |x| x + 1
}
```
the `|x| x + 1` expr has a type of `Closure(?31t)` which we wind up inferring the RPIT to. The `CoerceMany` `ret_coercion` for the whole `peculiar` typeck has an expected type of `RPIT` (unnormalized). When we type check the `return |x| x + 1` expr we go from the never type to `Closure(?31t)` which then participates in the `ret_coercion` giving us a `coerce-lub(RPIT, Closure(?31t))`.

Normalizing `RPIT` gives us some `Closure(?50t)` where `?31t` and `?50t` have been unified with `?31t` as the root var. `resolve_vars_if_possible` doesn't resolve infer vars to their roots so these wind up with different structural identities so the fast path doesn't apply and we fall back to coercing to a `fn` ptr. cc rust-lang/rust#147193 which also fixes this

New solver probably just gets more inference variables here because canonicalization + generally different approach to normalization of opaques. Idk :3

### FCP worthy stuffy

there are some other FCP worthy things but they're in my FCP comment which also contains some analysis of the breaking nature of the previously listed changes in this PR: https://github.com/rust-lang/rust/pull/148602#issuecomment-3503497467
2025-12-05 11:46:41 +00:00
Ralf Jung f040a1a915 interpret: test SNaN handling of float min/max and update comments 2025-12-05 08:53:42 +01:00
Zalathar 84ff44c749 Add perma-unstable --print=backend-has-zstd for use by compiletest
Tests for `-Zdebuginfo-compression=zstd` need to be skipped if LLVM was built
without support for zstd compression.

Currently, compiletest relies on messy and fragile heuristics to detect whether
the compiler's LLVM was built with zstd support. But the compiler itself
already knows whether LLVM has zstd or not, so it's easier for compiletest to
just ask the compiler.
2025-12-05 14:27:52 +11:00
bors 864339abf9 Auto merge of #149653 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

9 commits in bd979347d814dfe03bba124165dbce9554d0b4d8..2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac
2025-12-02 16:03:50 +0000 to 2025-12-04 16:47:28 +0000
- fix(publish): Move `.crate` out of final artifact location (rust-lang/cargo#15915)
- Remove legacy tmpdir support (rust-lang/cargo#16342)
- Run clippy CI on more targets (rust-lang/cargo#16340)
- feat: support for rustdoc mergeable cross-crate info (rust-lang/cargo#16309)
- fix(timings): unlocked -&gt; unblocked (rust-lang/cargo#16337)
- fix(layout): Put examples in their unit dir in new layout (rust-lang/cargo#16335)
- fix(frontmatter): Restrict code fence length  (rust-lang/cargo#16334)
- Update resolver.md: fix compile errors in pseudocode (rust-lang/cargo#16333)
- fix(fingerprint): clean doc dirs for only requested targets (rust-lang/cargo#16331)

This is best being merged before beta cutoff because rust-lang/cargo#16337 is a nightly regression.
2025-12-05 01:24:59 +00:00
bors 3e2dbcdd3a Auto merge of #149646 - matthiaskrgr:rollup-jbfeow8, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#147224 (Emscripten: Turn wasm-eh on by default)
 - rust-lang/rust#149405 (Recover on misspelled item keyword)
 - rust-lang/rust#149443 (Tidying up UI tests [6/N])
 - rust-lang/rust#149524 (Move attribute safety checking to attribute parsing)
 - rust-lang/rust#149593 (powf, powi: point out SNaN non-determinism)
 - rust-lang/rust#149605 (Use branch name instead of HEAD when unshallowing)
 - rust-lang/rust#149612 (Apply the `bors` environment also to the `outcome` job)
 - rust-lang/rust#149623 (Don't require a normal tool build of clippy/rustfmt when running their test steps)
 - rust-lang/rust#149627 (Point to the item that is incorrectly annotated with `#[diagnostic::on_const]`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-04 22:04:03 +00:00
Weihang Lo d898b568d3 Update cargo submodule 2025-12-04 13:10:02 -05:00
Matthias Krüger f2d4955335 Rollup merge of #149623 - jieyouxu:redundant-tool-test-step, r=Zalathar
Don't require a normal tool build of clippy/rustfmt when running their test steps

This is redundant and wasteful.

Noticed in https://github.com/rust-lang/rust/pull/147372#discussion_r2585886897.
2025-12-04 16:07:56 +01:00
Matthias Krüger f610f0568a Rollup merge of #149605 - Kobzol:unshalllow-beta, r=cuviper
Use branch name instead of HEAD when unshallowing

Fixes a regression with the beta channel that was discovered in https://github.com/rust-lang/rust/pull/149572.

r? `@cuviper`
2025-12-04 16:07:55 +01:00
Matthias Krüger 364b20e5f8 Rollup merge of #149593 - RalfJung:pow-nondet, r=Amanieu
powf, powi: point out SNaN non-determinism

The non-determinism has two sources:
- LLVM reserves the right to treat signaling NaNs as-if they were quiet, so it may fold `powf(x, 0)` to `1` even if `x` might be a signaling NaN.
- Some libm `pow` implementations (e.g. the one in musl) don't implement the signaling NaN special-case. See https://rust.godbolt.org/z/chsbv5v4d.

Cc `@tgross35` `@Amanieu`
2025-12-04 16:07:54 +01:00
Matthias Krüger fa79ba65c5 Rollup merge of #149443 - reddevilmidzy:t6, r=Kivooeo
Tidying up UI tests [6/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang/rust#133895

removed directory  `tests/ui/trait-objects`,  `tests/ui/for`, `tests/ui/warnings`

`trait-objects` -> `traits/object`
`for` -> `for-loop-while` (except `for/issue-20605.rs` test. this relocated to `traits/dyn-iterator-deref-in-for-loop.rs`)
`warnings` -> `resolve`, `entry-point`

r? Kivooeo
2025-12-04 16:07:53 +01:00
Matthias Krüger c80ac0f21a Rollup merge of #147224 - hoodmane:wasm-eh-default-on, r=bjorn3
Emscripten: Turn wasm-eh on by default

As specified by [MCP](https://github.com/rust-lang/compiler-team/issues/920)
Resolves https://github.com/rust-lang/rust/issues/148309
Resolves https://github.com/rust-lang/rust/issues/112195
2025-12-04 16:07:51 +01:00
bors 29e035e172 Auto merge of #149632 - matthiaskrgr:rollup-c5iqgtn, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#149521 (Improve `io::Error::downcast`)
 - rust-lang/rust#149544 (Only apply `no_mangle_const_items`'s suggestion to plain const items)
 - rust-lang/rust#149545 (fix the check for which expressions read never type)
 - rust-lang/rust#149570 (rename cortex-ar references to unified aarch32)
 - rust-lang/rust#149574 (Batched compiletest Config fixups)
 - rust-lang/rust#149579 (Motor OS: fix compile error)
 - rust-lang/rust#149595 (Tidying up `tests/ui/issues` tests [2/N])
 - rust-lang/rust#149597 (Revert "implement and test `Iterator::{exactly_one, collect_array}`")
 - rust-lang/rust#149608 (Allow PowerPC spe_acc as clobber-only register)
 - rust-lang/rust#149610 (Implement benchmarks for uN::{gather,scatter}_bits)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-04 14:38:19 +00:00
Matthias Krüger 5c4915734d Rollup merge of #149608 - pmur:murp/ppc-clobber-speacc, r=Amanieu
Allow PowerPC spe_acc as clobber-only register

This register is only supported on the *powerpc*spe targets. It is only recognized by LLVM. gcc does not accept this as a clobber, nor does it support these targets.

This is a volatile register, thus it is included with clobber_abi.

r? `@Amanieu`
r? `@antoyo`
2025-12-04 09:22:15 +01:00
Matthias Krüger c598b4e300 Rollup merge of #149597 - jdonszelmann:revert-iterator-exactly-one, r=wafflelapkin
Revert "implement and test `Iterator::{exactly_one, collect_array}`"

This reverts https://github.com/rust-lang/rust/pull/149270

I was quite excited it merged, and immediately realized with ``@WaffleLapkin`` that this is a breaking change on nightly! Despite still being marked as unstable, the name conflicts with the name on itertools as was discussed on the PR itself: https://github.com/rust-lang/rust/pull/149270#issuecomment-3573812447.

I'll reopen the PR though, and mark it as blocked on https://github.com/rust-lang/rust/pull/148605
2025-12-04 09:22:14 +01:00
Matthias Krüger b54ff3d78c Rollup merge of #149574 - jieyouxu:compiletest-cli, r=Zalathar
Batched compiletest Config fixups

A few batched `compiletest` `Config` self-consistency fixups, mostly to get it out of the way for follow-up changes I would like to make (namely, I would like to slightly cleanup the config parsing logic).

### Review remarks

Changes are best reviewed commit-by-commit. This PR should contain no functional changes.

r? `@Zalathar` (or bootstrap/compiler)
2025-12-04 09:22:13 +01:00
Matthias Krüger c3abbc6ce4 Rollup merge of #149570 - robamu:rename-cortex-ar-to-aarch32, r=ehuss
rename cortex-ar references to unified aarch32

Just a little documentation update. Thanks to the amazing work of `@thejpster`  , we have a unified `aarch32-rt` run-time for both Cortex-A and Cortex-R.
2025-12-04 09:22:12 +01:00
bors b1b08cdef5 Auto merge of #149631 - matthiaskrgr:rollup-jbx443u, r=matthiaskrgr
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#147841 (Fix ICE when applying test macro to crate root)
 - rust-lang/rust#149147 (Fix unused_assignments false positives from macros)
 - rust-lang/rust#149183 (Use `TypingMode::PostAnalysis` in `try_evaluate_const`)
 - rust-lang/rust#149456 (std: don't call `current_os_id` from signal handler)
 - rust-lang/rust#149501 (CTFE: avoid emitting a hard error on generic normalization failures)
 - rust-lang/rust#149528 (reword error for invalid range patterns)
 - rust-lang/rust#149539 (Additional test for uN::{gather,scatter}_bits)
 - rust-lang/rust#149549 (Regression test for system register `ttbr0_el2`)
 - rust-lang/rust#149550 (Disable native-lib for x check miri)
 - rust-lang/rust#149554 (build-manifest: generate MSI and MINGW arrays from rustc)
 - rust-lang/rust#149557 (c-variadic: bpf and spirv do not support c-variadic definitions)
 - rust-lang/rust#149569 (Fix mailmap issue)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-04 08:18:30 +00:00
Matthias Krüger b63ef74e5a Rollup merge of #149554 - mati865:build-manifest-more-gen, r=Mark-Simulacrum
build-manifest: generate MSI and MINGW arrays from rustc

An alternative to rust-lang/rust#149503

The arrays after generating:
```
❯ bat -n build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/build/build-manifest-e0236666c7c4187b/out/targets.rs | rg MSI -A14
 136 static MSI_INSTALLERS: &[&str] = &[
 137     "aarch64-pc-windows-gnullvm",
 138     "aarch64-pc-windows-msvc",
 139     "i686-pc-windows-gnu",
 140     "i686-pc-windows-msvc",
 141     "x86_64-pc-windows-gnu",
 142     "x86_64-pc-windows-gnullvm",
 143     "x86_64-pc-windows-msvc",
 144 ];
 145 static MINGW: &[&str] = &[
 146     "aarch64-pc-windows-gnullvm",
 147     "i686-pc-windows-gnu",
 148     "x86_64-pc-windows-gnu",
 149     "x86_64-pc-windows-gnullvm",
 150 ];
```

r? ```@Mark-Simulacrum```
2025-12-04 08:46:24 +01:00
Matthias Krüger 5105c4fcae Rollup merge of #149550 - bjorn3:faster_compile_time_deps, r=RalfJung
Disable native-lib for x check miri

This reduces check times for miri from 2m15s to 20s. And reduces check times for miri with --compile-time-deps from 1m50s to 7s. This makes rust-analyzer start a lot faster after switching branches.

r? ```@RalfJung```
2025-12-04 08:46:23 +01:00
bors 556beb9ec7 Auto merge of #149602 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/633cff25206d5108043d87617a43c9d04aa42c88.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-12-04 05:03:04 +00:00
Jieyou Xu 4d21e768f1 Don't require a normal tool build of clippy/rustfmt when running their test steps
This is redundant and wasteful.
2025-12-04 09:59:01 +08:00
bors 5325015e29 Auto merge of #149600 - mati865:restore-msys2, r=Kivooeo,tgross35
Revert #149516 to fix i686-pc-windows-gnu host

Revert rust-lang/rust#149516 because it caused dist to pick up x86_64 `libwinpthreads.dll` dependency, resulting in broken toolchain.

Note, I didn't use the procedure explained at: https://forge.rust-lang.org/compiler/reviews.html#reverts because the revert button isn't there.

This reverts commit 5afd8ff8df, reversing
changes made to 7cb02f9752.
2025-12-04 00:12:49 +00:00
Hood Chatham f07a84fde8 Emscripten: Turn wasm-eh on by default
As specified by MCP:
https://github.com/rust-lang/compiler-team/issues/920
Resolves https://github.com/rust-lang/rust/issues/148309
2025-12-03 14:34:07 -08:00
Mateusz Mikuła fdea885b80 Revert #149516 to fix i686-pc-windows-gnu host
Revert #149516 because it caused dist to pick up x86_64
`libwinpthreads.dll` dependency, resulting in broken toolchain.

This reverts commit 5afd8ff8df, reversing
changes made to 7cb02f9752.
2025-12-03 21:23:37 +01:00
Ralf Jung d633b668a0 update miri comments regarding pow non-determinism 2025-12-03 19:44:34 +01:00
Jakub Beránek fce8552f82 Use branch name instead of HEAD when unshallowing 2025-12-03 19:43:50 +01:00
Paul Murphy b54b288518 Allow PowerPC spe_acc as clobber-only register
This register is only supported on the *powerpc*spe targets. It is
only recognized by LLVM. gcc does not accept this as a clobber, nor
does it support these targets.

This is a volatile register, thus it is included with clobber_abi.
2025-12-03 12:37:22 -06:00
Lukas Wirth 0e706a5c79 Merge pull request #21195 from Veykril/push-nnzprznzurwz
fix: More proc-macro-srv proto fixes
2025-12-03 16:15:37 +00:00
Jana Dönszelmann c3407323ad Revert "fixup warnings around the compiler"
This reverts commit f20175293a.
2025-12-03 16:34:32 +01:00
Lukas Wirth 0c605dd416 fix: More proc-macro-srv proto fixes 2025-12-03 16:17:51 +01:00
Boxy Uwu 76bd21ad66 account for safe target features in fndef<->closure and fndef<->fndef coerce-lubs 2025-12-03 14:55:41 +00:00
bjorn3 b3bf3158ec Disable native-lib for x check miri
This reduces check times for miri from 2m15s to 20s. And reduces check
times for miri with --compile-time-deps from 1m50s to 7s. This makes
rust-analyzer start a lot faster after switching branches.
2025-12-03 14:49:36 +00:00
Jieyou Xu c18cd270b4 compiletest: flip nocapture to capture 2025-12-03 20:33:19 +08:00
Jieyou Xu 57f9580f10 compiletest: change some Strings to Utf8PathBuf 2025-12-03 20:30:38 +08:00
Jieyou Xu 6a00f0d4ff compiletest: fixup comment for rustc_path 2025-12-03 20:30:37 +08:00
Jieyou Xu 0654444d7f compiletest: rename run_lib_path -> target_run_lib_path 2025-12-03 20:29:47 +08:00
Jieyou Xu ae93635f5d compiletest: rename compile_lib_path -> host_compile_lib_path 2025-12-03 20:29:46 +08:00
bors 568b117627 Auto merge of #149555 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

14 commits in 2a7c4960677971f88458b0f8b461a866836dff59..bd979347d814dfe03bba124165dbce9554d0b4d8
2025-11-25 19:58:07 +0000 to 2025-12-02 16:03:50 +0000
- fix(completion): Put host-tuple before actual tuples (rust-lang/cargo#16327)
- fix(lints): use plural form correctly (rust-lang/cargo#16324)
- fix(completions): include `all` in `cargo tree --target` candidates (rust-lang/cargo#16322)
- fix(lints): show lint error number (rust-lang/cargo#16320)
- chore(deps): update compatible (rust-lang/cargo#16318)
- chore(deps): update crate-ci/typos action to v1.40.0 (rust-lang/cargo#16316)
- Do not lock the artifact-dir for check builds + fix uplifting (rust-lang/cargo#16307)
- Properly validate crate names in `cargo install` (rust-lang/cargo#16314)
- Support --filter-platform=host for cargo metadata rust-lang/cargo#9423 (rust-lang/cargo#16312)
- Update to mdbook 0.5 (rust-lang/cargo#16292)
- refactor(clean): Better divide old / new layout (rust-lang/cargo#16304)
- update: silent failure on non-matching package specs with --breaking (rust-lang/cargo#16276)
- fix(log): break timing-info message to multiple (rust-lang/cargo#16303)
- fix(clean): Clean hosts builds with new layout (rust-lang/cargo#16300)
2025-12-03 12:04:40 +00:00
Chayim Refael Friedman 0b59d4867b Merge pull request #21198 from A4-Tacks/nested-incomplete-let-semi
Fix nested expr missing semicolon in incomplete-let
2025-12-03 11:16:26 +00:00
A4-Tacks 481910002d Fix nested expr missing semicolon in incomplete-let
Example
---
```rust
fn main() {
    let x = &$0
}
```

**Before this PR**

```rust
fn main() {
    let x = &loop {
        $0
    }
}
```

**After this PR**

```rust
fn main() {
    let x = &loop {
        $0
    };
}
```
2025-12-03 19:06:03 +08:00
Chayim Refael Friedman f523e953f1 Introduce a type alias for HirDisplay's Result
Simplify the code a bit.
2025-12-03 12:12:54 +02:00
Lukas Wirth 95cee9cccf Merge pull request #21164 from Wilfred/multiple_discover_requests
fix: Allow multiple discover operations
2025-12-03 08:51:11 +00:00
Lukas Wirth 1e3fbf9183 Merge pull request #21188 from Wilfred/fix_rustdoc_and_add_ci
Fix rustdoc warnings and add CI
2025-12-03 08:51:04 +00:00
bors 8202d11051 Auto merge of #149581 - matthiaskrgr:rollup-w4dixyc, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#148937 (Remove initialized-bytes tracking from `BorrowedBuf` and `BorrowedCursor`)
 - rust-lang/rust#149553 (added default_uwtables=true to aarch64_unknown_none targets)
 - rust-lang/rust#149578 (rustdoc: Fix broken link to `Itertools::format`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-03 07:56:09 +00:00
Matthias Krüger 7432e9ed6c Rollup merge of #149578 - lapla-cogito:rustdoc_iterformat, r=notriddle
rustdoc: Fix broken link to `Itertools::format`

close rust-lang/rust#148879
2025-12-03 07:36:14 +01:00
lapla 8949b816ee rustdoc: Fix broken link to Itertools::format 2025-12-03 12:56:30 +09:00
Eric Huss 880a779999 Update reference
Pulls in https://github.com/rust-lang/reference/pull/2080 to fix the tests.
2025-12-02 19:27:15 -08:00