Skip to content

Rollup of 9 pull requests - #163439

Merged
rust-bors[bot] merged 26 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-cN1wvvO
Sep 28, 2026
Merged

rust-bors[bot] merged 26 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-cN1wvvO

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

hizyyo and others added 26 commits September 23, 2026 21:45
When it was added in PR 37412 it was a simple three-value lattice type
implementing `PartialOrd`/`Ord`, and also implementing `BitAnd`/`BitOr`
using `min`/`max`. This all made sense.

Then in PR 64592 the `Always` variant got a span and a custom note
added. This makes the meaning of all those operations much murkier. And
the `is_always` method gained an alarming comment:

> Enum comparison ignores the contents of fields, so we just fill them
> in with garbage here.

This is false! Enum comparison does use the contents of fields.

This commit removes the `PartialOrd`/`Ord` impls and redoes
`BitAnd`/`BitOr` in a way that preserves existing behaviour without
relying on `span` and `custom_note` ordering. In the `Always`/`Always`
case we now always use the fields from `self`; this is potentially
different to the old behaviour but in practice no test outputs are
affected, and at most some error messages might be slightly different.

This helps with the next commit by removing some `Span` ordering
operations.
The rustc driver sets the default stack size to 16MB, however
worker threads spawned by the backend will use std's default
stack size (usually 2MB).

Pass through the stack size chosen by the driver to the backend,
and explicitly request the stack size.
On most platforms, `send` takes a `size_t` length, but returns an
`ssize_t` count of bytes written. This means that the actual limit
is `ssize_t::MAX`, not `size_t::MAX`.

QNX has a bug on top of this, where the returned length appears
to be converted to a C `int` and back, resulting in the wrong return
value if the length is >= 2^31 bytes.
`Span` and `SpanData` encode four fields: `lo`/`hi`, `ctxt`, and
`parent`. `ctxt` and `parent` have unorderable types.

Both types ignore `ctxt` and `parent` for `PartialOrd`/`Ord`. But their
`PartialEq`/`Eq` impls do *not* ignore those fields. This eq/ord
inconsistency is a bug. It was introduced in rust-lang#123165.

The idea of ordering spans in general is dubious, because of `ctxt` and
`parent`. But the idea of ordering spans just with `lo`/`hi` is fine.
Therefore, this commit does the following.

- Removes the `PartialOrd`/`Ord` impls for `Span`/`SpanData`

- Adds a `Span::lo_hi` method which can be used in lots of places where
  span locations are involved in sorting. E.g.
  `xs.sort_by_key(|span| span.lo_hi())`

- Adds `OrdSpan`, a newtype around `Span` that impls
  `PartialEq`/`Eq`/`PartialOrd`/`Ord` using `lo_hi`. This is for storing
  spans in ordered types like `BTreeMap<OrdSpan, T>`.

Note also that some `sort`+`dedup` combinations might not remove all
duplicates with the old eq/ord inconsistency. These now all do the right
thing, which could affect some error messages, though in practice
nothing in the test suite is affected.
It can be replaced with `Span::lo_hi` + `==`.
…s-rachel

Fix maximum `send` length on non-{Mac, Windows} platforms

On these platforms, `send` takes a `size_t` length, but returns an `ssize_t` count of bytes written. This means that the actual limit is `ssize_t::MAX`, not `size_t::MAX`.

On QNX, the limit needs to be reduced further, to `c_int::MAX` (just like for Mac), because larger `send` calls return incorrect counts of bytes written.
… r=petrochenkov

fix ice for unresolved inherent delegation

fixes: [162774](rust-lang#162774)
also adds a regression test for the ICE.
plus follow-up commits addressing review feedback on error propagation for `TypeRelativeDelegationRes::Error`.
… r=jieyouxu

x perf takes database path

r? @jieyouxu (or anyone else who wants, it's not a very complicated change)

> [!NOTE]
> I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.
…anBrouwer

Move the foreign module #[link] ABI check to attribute parsing

Addresses rust-lang#153101.

This moves the `#[link]` check for `extern "Rust"` blocks from the late HIR pass in `rustc_passes` to attribute finalization.

The check belongs to attribute validation, but it previously had to wait until HIR because the attribute parser did not know the foreign module's ABI. Instead of storing additional state in the parser or HIR, this change passes the ABI as local context for the current item. The authoritative ABI lowering remains unchanged, including invalid-ABI diagnostics, target validation, and feature gates.

This preserves the existing lint behavior while removing the separate HIR-side check. Regression tests cover the relevant ABI cases, lint levels, multiple `#[link]` attributes, and invalid-ABI recovery.
…=folkertdev

regression test for inherent associated const ICE

Closes rust-lang#142722
Yeet `propagate_ambiguity`

Fixes rust-lang/project-assumptions-on-binders#29

When assumptions computation fails, we want to force the goal response to be ambiguous since we can't evaluate placeholder constraints.
We used to do this via `LeafRegionConstraint::Ambiguity` and propagates it everywhere.

This PR simplifies that by tracking whether we should force ambiguity in a more direct way. We just check whether we have computed assumptions for relevant universes.
This also clarifies the meaning of `LeafRegionConstraint::Ambiguity` which only represents true ambiguity (forever ambiguity no matter inference progress).

This doesn't solve the problem that we're being conservative about forcing ambiguity. Maybe we can have `false`s in  some universes even if other universes don't have assumptions. We can be smart about this in the future.

Unsure part: we can also have ambiguity from non-lifetime placeholder. Unsure what to do with that. Still trying to understand it.

r? @BoxyUwU
Ensure llvm worker threads have sufficient stack space

The rustc driver sets the default stack size to 16MB, however worker threads spawned by the backend will use std's default stack size (usually 2MB).

Pass through the stack size chosen by the driver to the backend, and explicitly request the stack size.

This probably isn't the preferred way to do this, but maybe a starting point to educate me.

This doesn't catch every spawned thread (jobserver and ctrlc also create them through std). Are there other threads which might be sensitive to small stack sizes?

Fixes rust-lang#163272
…-obk

Remove `PartialOrd`/`Ord` impls for `Span`/`SpanData`

Because they are inconsistent with the `PartialEq`/`Eq` impls, and span ordering is inherently dubious. Details in individual commits.

r? @oli-obk
…e, r=jieyouxu

triagebot: Subscribe me to changes in test-float-parse
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 28, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) labels Sep 28, 2026
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 28, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 232360b 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 Sep 28, 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 Sep 28, 2026
@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 6m 45s
Pushing 77027b6 to main...

@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 51c768a (parent) -> 77027b6 (this PR)

Test differences

Show 28 test diffs

Stage 1

  • [ui (polonius)] tests/ui/associated-inherent-types/ice-normalize-inherent-assoc-const.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/attributes/link-foreign-mod-abi.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/attributes/link-invalid-abi.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/delegation/delegation-inherent-impl-issue-162774.rs: [missing] -> pass (J0)
  • [ui] tests/ui/associated-inherent-types/ice-normalize-inherent-assoc-const.rs: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/link-foreign-mod-abi.rs: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/link-invalid-abi.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/delegation-inherent-impl-issue-162774.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/associated-inherent-types/ice-normalize-inherent-assoc-const.rs: [missing] -> pass (J2)
  • [ui] tests/ui/attributes/link-foreign-mod-abi.rs: [missing] -> pass (J2)
  • [ui] tests/ui/attributes/link-invalid-abi.rs: [missing] -> pass (J2)
  • [ui] tests/ui/delegation/delegation-inherent-impl-issue-162774.rs: [missing] -> pass (J2)

Additionally, 16 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 77027b64d82d1e92f9ce2ea9042081c4567f5524 --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. test-x86_64-gnu-aux: 1h 50m -> 2h 38m (+43.6%)
  2. test-x86_64-gnu-miri: 1h 1m -> 1h 27m (+42.5%)
  3. dist-x86_64-llvm-mingw: 2h 11m -> 1h 21m (-38.3%)
  4. dist-x86_64-msvc-alt: 2h 50m -> 1h 45m (-37.9%)
  5. dist-x86_64-msvc: 3h -> 1h 57m (-35.0%)
  6. test-x86_64-gnu-llvm-21-3: 1h 59m -> 1h 17m (-34.9%)
  7. optional-test-x86_64-gnu-autodiff: 43m 52s -> 57m 40s (+31.5%)
  8. dist-x86_64-musl: 1h 52m -> 2h 27m (+31.2%)
  9. test-x86_64-gnu: 2h -> 2h 37m (+31.1%)
  10. test-x86_64-gnu-gcc: 56m 21s -> 1h 13m (+30.4%)
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.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (77027b6): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.7%, -0.1%] 19
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.5%, secondary 3.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.5% [6.5%, 6.5%] 1
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.6%] 1
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Cycles

Results (secondary 3.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
8.2% [8.2%, 8.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.6% [-0.6%, -0.6%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 6
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 5
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 6

Bootstrap: 488.57s -> 490.938s (0.48%)
Artifact size: 406.43 MiB -> 407.20 MiB (0.19%)

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#162915 Fix maximum send length on non-{Mac, Windows} platforms 1cb7ee0e4eb73e4a7e727d26f93626b506699774
(link)
#162917 fix ice for unresolved inherent delegation 7c14a1206cb1b03f54e82159832f26b2e2ea7f75
(link)
#163209 x perf takes database path 8768ef7f4061bf8f693df32c5aa4ab1ea31a17a7
(link)
#162373 Move the foreign module #[link] ABI check to attribute pars… 4a60d690f485ba0b2b464d79d0483e703af8b749
(link)
#162829 regression test for inherent associated const ICE 277d03f6a1be62493b21011c76a308bf1552f2c8
(link)
#162935 Yeet propagate_ambiguity 2be20bd66d5ec5013979d1a6938c9bb63b5661f7
(link)
#163289 Ensure llvm worker threads have sufficient stack space 37cab565ec04533012e1ac4f4a07f2af27bfdec9
(link)
#163303 Remove PartialOrd/Ord impls for Span/SpanData e5b91a37a280273bf242d8414cc52e0c2fe02e1c
(link)
#163421 triagebot: Subscribe me to changes in test-float-parse 9162f77d12a5379d5d567cc8f091edfb803de699
(link)

parent commit: 51c768aa5c

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@rust-timer triage all

@rust-timer

rust-timer commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator
Running triage with 8 benchmarks

Triage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
For this rollup, these benchmarks are:

  • coercions
  • deeply-nested-multi-new-solver
  • diesel-2.2.10-new-solver
  • match-stress
  • nalgebra-0.33.0-new-solver
  • serde-1.0.219-new-solver
  • syn-2.0.101-new-solver
  • wg-grammar-new-solver

#162915 1cb7ee0 Fix maximum send length on non-{Mac, Windows} platforms

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -1.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-1.5%, -1.5%] 1
All ❌✅ (primary) - - 0

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#162917 7c14a12 fix ice for unresolved inherent delegation

This perf run didn't have relevant results for the `instruction count` metric.

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#163209 8768ef7 x perf takes database path

This perf run didn't have relevant results for the `instruction count` metric.

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#162373 4a60d69 Move the foreign module #[link] ABI check to attribute parsing

This perf run didn't have relevant results for the `instruction count` metric.

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#162829 277d03f regression test for inherent associated const ICE

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#162935 2be20bd Yeet propagate_ambiguity

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.7%, -0.1%] 19
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (secondary -4.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.0% [-4.0%, -4.0%] 1
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.


#163289 37cab56 Ensure llvm worker threads have sufficient stack space

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#163303 e5b91a3 Remove PartialOrd/Ord impls for Span/SpanData

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.


#163421 9162f77 triagebot: Subscribe me to changes in test-float-parse

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. 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.