Skip to content

Rollup of 13 pull requests#157991

Merged
rust-bors[bot] merged 36 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-vlRn7Dc
Jun 16, 2026
Merged

Rollup of 13 pull requests#157991
rust-bors[bot] merged 36 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-vlRn7Dc

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

kpreid and others added 30 commits May 25, 2026 16:24
Fixes <rust-lang#147714>.

The changes in `const_to_pat.rs` are entirely to avoid regressing
diagnostic quality, and should not make any difference to what code is
accepted. The change in `compute_applicable_impls_for_diagnostics`
and its callers is entirely to be able to reuse that algorithm for this
purpose.
These functions make it easy to read a fixed-size type as little-endian
or big-endian. They're trivial wrappers around the combination of
`io::Read::read_array` and `T::from_le_bytes`/`T::from_be_bytes`.

The implementation uses a sealed trait `FromEndianBytes`. That trait is
currently in `std` and accepts a `&mut io::Read`. Once we can use
associated consts in the types of method parameters, we can change this
trait to have `from_le_bytes` and `from_be_bytes` methods, move it to
`core`, and make it public.
Instead of keeping it as `only-bpf`, use minicore. This way we make sure
it will never get outdated again.
connect_timeout cast timeout.as_secs() (u64) straight to tv_sec, which is
c_long (i32 on 32-bit Solid), so timeouts over ~68 years truncated to a
wrong or negative value. Clamp to c_long::MAX, matching set_timeout in the
same file.
Removes the `enabledManagers` override so all managers run, but requires
manual approval from the Dependency Dashboard before any PRs are opened.
The dashboard then acts as a preview without cluttering the PR list.
Subtrees are updated in their upstream repositories and synced into the
tree, so Renovate should not manage their dependencies here. Without this,
Renovate would surface pinned actions from every subtree workflow file
(see rust-lang#134127).

Mirrors the subtree list in `external-repos.md`.
Pins GitHub Actions to their commit SHA digests and keeps them updated.
This lets Renovate handle the pinning that was proposed in
rust-lang#155089 instead of maintaining it
manually.
* fix(rustc_codegen_ssa): Use cg_operand for Freeze check
* chore: remove unnecessary comment
* test: add test for ssa rval monomorphization issue
* fix: move ssa-rval-monomorphization test
* tweak comment

Co-authored-by: Ralf Jung <post@ralfj.de>
…liasTerm, r=lcnr

Refactor `AliasTy`. `AliasTerm` & `UnevaluatedConst` to use `Alias`

Refactors `AliasTy`, `AliasTerm` & `UnevaluatedConst` to use `Alias`.

Part of rust-lang#156181

r? @lcnr
Add `T: PartialEq` bounds to derived `StructuralPartialEq` impls.

Fixes <rust-lang#147714>.

This is a breaking change to fix a bug, so it will need a crater run if it is to be done at all.

The changes in `const_to_pat.rs` are entirely to avoid regressing diagnostic quality, and should not make any difference to what code is accepted. The changes in `compute_applicable_impls_for_diagnostics` and its callers are entirely to be able to reuse that algorithm for this purpose.

@rustbot label +T-lang
…-symbols, r=petrochenkov

Staticlib rename internal symbols

Follow-up to rust-lang#155338.

`-Zstaticlib-rename-internal-symbols` appends a crate-specific suffix (`_rs{StableCrateId}`) to non-exported symbols, resolving duplicate symbol conflicts when linking multiple Rust staticlibs into the same binary.

The implementation collects all defined `GLOBAL/WEAK` symbol names not in the exported set across all .o files, then renames them by extending the strtab and patching symbol name offsets. When combined with `-Zstaticlib-hide-internal-symbols`, the renamed symbols also receive `STV_HIDDEN` visibility.

Supported on ELF targets (Linux, BSD, etc.) and Apple targets (macOS, iOS, etc.). On unsupported targets (Windows), a warning is emitted and the flag has no effect.

r?@bjorn3 @petrochenkov
Add `io::Read::read_le` and `io::Read::read_be`

These functions make it easy to read a fixed-size type as little-endian
or big-endian. They're trivial wrappers around the combination of
`io::Read::read_array` and `T::from_le_bytes`/`T::from_be_bytes`.

The implementation uses a sealed trait `FromEndianBytes`. That trait is
currently in `std` and accepts a `&mut io::Read`. Once we can use
associated consts in the types of method parameters, we can change this
trait to have `from_le_bytes` and `from_be_bytes` methods, move it to
`core`, and make it public.

---

As discussed at RustWeek.
…i-indirect-return, r=nagisa

tests: codegen-llvm: Expect the new mangling scheme in bpf-abi-indirect-return

[The new Rust symbol mangling](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html) uses prefix `_R` instead of `@_ZN`.

Instead of keeping the test as `only-bpf`, use minicore. This way we make sure it will never get outdated again.

r? @nagisa
…info, r=davidtwco,estebank

Add expansion info to implied bounds

r? @estebank maybe?

cc @davidtwco for implied bound diagnostics

We used to have various fun ways for testing whether a `Sized` bound was implicit or not (usually by checking if the span was equal to the span of a generic parameter). That felt a bit hacky, so I checked what happens if we explicitly mark the span as being desugared. Turns out a lot of diagnostics break. You can see in the diff where I changed things to make them work again.

Then it became clear that we were missing out on various other implied bound sites, and we just got all of them basically for free now.

I think there are various other good refactorings we can do (probably not special casing `Sized` and not special casing implied bound desugarings, but just reporting all desugarings), but for now this PR is in a state where I'd rather merge it than add more to it
…-vec, r=oli-obk

constify `TryFrom<Vec>` for array

Related issues rust-lang#79597, rust-lang#143773, rust-lang#133214

this makes `Vec` `const Destruct` along the way.
…80, r=lcnr

diagnostics: point to coroutine body on higher-ranked auto trait errors

Fixes rust-lang#155880

When encountering a higher-ranked auto trait bound error involving a coroutine or async function,the trait solver previously used the span of the outermost cause (eg. `spawn(...)` or `is_send(...)`).

This PR modifies the `TraitPlaceholderMismatch` formatting logic to walk down the `ObligationCauseCode` chain.If the obligation originates from a `ty::Coroutine` or `ty::CoroutineWitness`, it extracts that specific span, providing a much more accurate underline for the user.

#### Before:
```text
error: implementation of `Send` is not general enough
  --> src/main.rs:25:5
   |
25 |     is_send(outer())
   |     ^^^^^^^^^^^^^^^^ implementation of `Send` is not general enough
```

#### After:
```text
error: implementation of `Send` is not general enough
  --> src/main.rs:13:74
   |
13 |   async fn inner<'a, T: Trait + 'a>(_: T, x: T::Assoc<'a>) -> T::Assoc<'a> {
   |  __________________________________________________________________________^
14 | |     std::future::ready(x).await
15 | | }
   | |_^ implementation of `Send` is not general enough
```
…nome

std: sys: solid: clamp connect_timeout tv_sec instead of truncating

connect_timeout cast timeout.as_secs() (u64) straight to tv_sec, which is c_long (i32 on 32-bit Solid), so timeouts over ~68 years truncated to a wrong or negative value. Clamp to c_long::MAX, matching set_timeout in the same file.
Configure Renovate for GitHub Actions

This sets up Renovate to keep our GitHub Actions pinned to commit SHAs and up to date, as a follow-up to rust-lang#155089 where we pinned them by hand. The actual pinning is handled by the `helpers:pinGitHubActionDigests` preset.

For now every update has to be approved from the Dependency Dashboard before Renovate opens a PR. I expect this to be temporary while we get the config right, since it lets us preview what Renovate wants to do without flooding the PR list. Once the pinning and the update PRs look correct, we can drop the approval requirement for the github-actions manager and let those flow through automatically.

Renovate also skips the subtree paths, since those tools are maintained in their own repositories and synced back in, and rust-lang#134127 showed what happens when it starts editing them directly. The lockfile maintenance job is gone as well, since it was broken anyway.

r? @marcoieni
… r=RalfJung

fix(rustc_codegen_ssa): Use cg_operand for Freeze check

Hi, this is my first contribution, so please forgive my incorrect conventions...
I found that rust-lang#157922 is simple issue.

Fixes rust-lang#157922

## Cause of issue

In `rustc_codegen_ssa/src/mir/rvalue.rs`, `Freeze` check is called for non-monomorphized operand pointee type of `RValue`.
Before this method call, there is already called `codegen_operand` method for the operand, so I use this for `Freeze` check.
…=JonathanBrouwer

doc: Document `-Zlint-rust-version`

Followup to rust-lang#157707
Tracking issue: rust-lang#157574

r? JonathanBrouwer
… r=JonathanBrouwer

Rename `errors.rs` file to `diagnostics.rs` (11/N)

Follow-up of rust-lang#157485.

This one is a bit different than the previous ones: it had both `diagnostics.rs` and `errors.rs` files, but both were switched compared to what the other compiler crates do (for `diagnostics.rs` in particular). So first we switched the two files, and then, to avoid confusion between `errors.rs` and `diagnostics.rs`, I renamed `errors.rs` into `error_helper.rs`.

r? @JonathanBrouwer
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 16, 2026
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 16, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8c537db has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 16, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 16, 2026
@rust-bors

rust-bors Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 21m 20s
Pushing 9e2abe0 to main...

@rust-bors rust-bors Bot merged commit 9e2abe0 into rust-lang:main Jun 16, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing c712ea9 (parent) -> 9e2abe0 (this PR)

Test differences

Show 640 test diffs

Stage 1

  • [ui] tests/ui/async-await/coroutine-auto-trait-span-issue-155880.rs: [missing] -> pass (J0)
  • [ui] tests/ui/consts/const_in_pattern/derive-and-manual-partialeq-issue-147714.rs: [missing] -> pass (J0)
  • [ui] tests/ui/generics/ssa-rval-monomorphization-issue-157922.rs: [missing] -> pass (J0)
  • [ui] tests/ui/linking/staticlib-rename-internal-symbols-wrong-crate-type.rs: [missing] -> pass (J0)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols: [missing] -> pass (J1)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols-macho: [missing] -> ignore (only executed when the target vendor is Apple) (J1)
  • [ui (polonius)] tests/ui/async-await/coroutine-auto-trait-span-issue-155880.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/consts/const_in_pattern/derive-and-manual-partialeq-issue-147714.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/generics/ssa-rval-monomorphization-issue-157922.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/linking/staticlib-rename-internal-symbols-wrong-crate-type.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/bpf-abi-indirect-return.rs: ignore (only executed when the architecture is bpf) -> pass (J9)

Stage 2

  • [run-make] tests/run-make/staticlib-rename-internal-symbols: [missing] -> ignore (ignored when cross-compiling) (J3)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols-macho: [missing] -> ignore (ignored when cross-compiling) (J3)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols-macho: [missing] -> pass (J4)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols-macho: [missing] -> ignore (only executed when the target vendor is Apple) (J5)
  • [codegen] tests/codegen-llvm/bpf-abi-indirect-return.rs: ignore (only executed when the architecture is bpf) -> pass (J6)
  • [ui] tests/ui/async-await/coroutine-auto-trait-span-issue-155880.rs: [missing] -> pass (J7)
  • [ui] tests/ui/consts/const_in_pattern/derive-and-manual-partialeq-issue-147714.rs: [missing] -> pass (J7)
  • [ui] tests/ui/generics/ssa-rval-monomorphization-issue-157922.rs: [missing] -> pass (J7)
  • [ui] tests/ui/linking/staticlib-rename-internal-symbols-wrong-crate-type.rs: [missing] -> pass (J7)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols: [missing] -> pass (J8)
  • [run-make] tests/run-make/staticlib-rename-internal-symbols: [missing] -> ignore (only executed when the target binary format is ELF) (J10)

Additionally, 618 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 9e2abe0c6ab27fcbb95c30695188a75776e2feb1 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-stable: 1h 32m -> 2h 30m (+62.1%)
  2. dist-x86_64-musl: 2h 25m -> 1h 31m (-37.0%)
  3. dist-apple-various: 2h 18m -> 1h 47m (-22.4%)
  4. dist-i686-linux: 1h 51m -> 1h 29m (-19.7%)
  5. aarch64-apple: 2h 43m -> 3h 14m (+19.1%)
  6. dist-x86_64-freebsd: 1h 32m -> 1h 15m (-18.3%)
  7. optional-x86_64-gnu-parallel-frontend: 2h 38m -> 2h 10m (-17.8%)
  8. dist-x86_64-mingw: 2h 37m -> 2h 9m (-17.7%)
  9. arm-android: 1h 26m -> 1h 40m (+15.4%)
  10. dist-aarch64-llvm-mingw: 1h 54m -> 1h 39m (-13.3%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.