Skip to content

Rollup of 17 pull requests#157683

Merged
rust-bors[bot] merged 45 commits into
rust-lang:mainfrom
jhpratt:rollup-n3DkSzN
Jun 10, 2026
Merged

Rollup of 17 pull requests#157683
rust-bors[bot] merged 45 commits into
rust-lang:mainfrom
jhpratt:rollup-n3DkSzN

Conversation

@jhpratt

@jhpratt jhpratt commented Jun 9, 2026

Copy link
Copy Markdown
Member

View all comments

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

traviscross and others added 30 commits May 20, 2026 20:34
The `TypeOutlives` handler in `evaluate_predicate_recursively` means
to check whether a type in a `T: 'a` predicate has free regions,
bound regions, non-region inference variables, or non-region generic
parameters -- and if so, to return `EvaluatedToOkModuloRegions`
rather than `EvaluatedToOk`.  Correspondingly, the comment says "no
free lifetimes or generic parameters".  But the code was mistakenly
checking `has_non_region_infer()` twice instead of checking both
`has_non_region_infer()` and `has_non_region_param()`.

This meant that `TypeOutlives(T, 'static)` where `T` is
a type parameter returned `EvaluatedToOk` -- claiming the
result holds unconditionally -- when the correct answer is
`EvaluatedToOkModuloRegions`.

The distinction matters during marker trait
winnowing in `prefer_lhs_over_victim`, which uses
`must_apply_considering_regions()` (true only for `EvaluatedToOk`)
to decide whether one impl beats another when there are multiple
candidates.  With the bug, a `T: 'static`-bounded impl appeared
equally as strong as an unrestricted impl, making the winner
depend on source order.  This caused spurious E0310 errors
when the more-constrained impl happened to appear after the
less-constrained one.

This fixes Rust issue 109481.  See PR 153847.

This same symptom was originally filed as issue 84917 and fixed in PR
88139.  Then PR 102472 rewrote the `TypeOutlives` handler, introducing
the duplicate `has_non_region_infer()` and losing the param check,
regressing this.  Around this same time, issue 109481 was filed.  It
noted the connection to PR 102472 -- that the bug only appeared after
it -- but the duplicate condition was not noticed.
It's harder than one would imagine to demonstrate that the
`has_non_region_infer()` check in the `TypeOutlives` handler is
load bearing (even though the check seems right analytically).
Fortunately, we did find a way to show this.  Let's add that test.

In working that out, we found two other interesting ways of showing
that the `has_non_region_param()` check matters.  Let's add those too.

Though we're concerned here with code in the old solver, we test
against both.
Since approx. Windows SDK 20348, the corresponding cdb (and/or its
underlying WinDbg engine) changed or regressed the `OsStr`/`OsString`
visualization, and no longer renders the emoji. Since approx. SDK/cdb
26100, the output formatting of the string containing UTF-8 (i.e. the
multi-byte emoji grapheme) seems to have further regressed (e.g. the end
quotation mark is no longer shown and command output becomes garbled).

Relevant issues:

* RUST-88840
* RUST-148743
* RUST-88796
The hand-written reader bootstrap.py uses to find the stage0 cargo and
rustc only recognized `[table]` headers, so dotted keys like
`build.cargo = "..."` were ignored. Parse the dotted prefix on each key
as the table it belongs to, resolved relative to the enclosing section,
and scope the cargo/rustc lookup to `[build]` so the Python and Rust
sides agree.
This makes a few changes to rustc_public to make it a little easier to
analyze ADT types.

* It implements `CrateDef` and `CrateDefType` for `FieldDef`, which
  allows easy access to the underlying `DefId`, names, and tool
  annotations.
* It adds `Crate::adts` to simplify stepping through all the ADTs in the
  crate.

Note that I did use Gemini to assist with writing this patch, but I
wrote most of it, reviewed all the vode, and verified the tests pass
locally.
Moreover, flesh out the rustdoc book section about code block attributes.
* Fix async drop glue for Box<T>
* Adress reviewer concerns
* Address more concerns
Incorrect types can't cause unsafety and making it untyped will make it
easier to get rid of the ProcMacro enum in the proc-macro ABI.
Instead encode this information in the crate metadata. This helps shrink
the proc-macro ABI to just the parts necessary for transmitting raw
bytes to perform RPC on top of.
…li-obk

Change type of async context parameter after state transform.

`Future::poll` expects a `&mut std::task::Context<'_>`. Meanwhile, async coroutines use `std::future::ResumeTy` as resume parameter. This is meant to workaround the limitations of borrowck, which cannot prove that coroutines implement `for<'a, 'b> CoroutineTrait<&'a mut Context<'b>>`.

In the coroutine state transform, we need to change the signature from `ResumeTy` to the proper `&mut Context<'_>`. The current code attempts to find locals that have type `ResumeTy` to change their type. This is needlessly complex and relies on undocumented behaviour of the MIR builder.

Instead, this PR proposes to replace the `ResumeTy` argument with a new local, with value `ResumeTy(transmute(context))`.

Based on rust-lang#156875.
…keys, r=clubby789

bootstrap: Handle dotted table keys when parsing bootstrap.toml

Fixes rust-lang#156948

`bootstrap.py` has a small hand-rolled reader that pulls the stage0 cargo and rustc out of `bootstrap.toml` before the real TOML parser is built. It only understood `[table]` headers, so the dotted form that `bootstrap.example.toml` now uses (`build.cargo = "..."`) was silently dropped, and the cargo/rustc lookup matched those keys in any table rather than only `[build]`.

Teach the reader to strip an optional dotted prefix and treat it as the key's table, the same way `configure.py` does when it writes the file, and scope the cargo/rustc lookup to `[build]`. New tests cover the dotted form, equivalence with the section form, wrong-table rejection, and dotted target keys.

*Disclosure: the code was written by AI (Claude); reviewed and tested by me.*
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

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

rust-bors Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for a498ff0 failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@jhpratt

jhpratt commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@bors retry

@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 10, 2026
@rust-bors

This comment has been minimized.

@jhpratt

jhpratt commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

well past the point where this failed before

@bors treeclosed-

@rust-bors

rust-bors Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Tree is now open for merging.

@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 10, 2026
@rust-bors

rust-bors Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 22m 58s
Pushing ab26b17 to main...

@rust-bors rust-bors Bot merged commit ab26b17 into rust-lang:main Jun 10, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 10, 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 d56483a (parent) -> ab26b17 (this PR)

Test differences

Show 53 test diffs

Stage 1

  • [run-make] tests/run-make/doctests-test_harness: [missing] -> pass (J2)
  • [ui] tests/rustdoc-ui/doctest/test_harness.rs: [missing] -> pass (J2)
  • [ui] tests/ui/feature-gates/feature-gate-splat.rs: [missing] -> pass (J2)
  • [ui] tests/ui/json/multibyte-rendered-ansi-issue-157148.rs: [missing] -> pass (J2)
  • [ui] tests/ui/lint/improper-ctypes/async-extern-fn-next-solver-issue-156352.rs: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs: pass -> [missing] (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-assoc-ty-binding-static.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-assoc-ty-binding-static.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-infer-resolved-to-param.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-infer-resolved-to-param.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-projection-static.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-projection-static.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/proc-macro/proc-macro-decls.rs: [missing] -> pass (J2)
  • [ui] tests/ui/splat/splat-invalid.rs: [missing] -> pass (J2)
  • [ui] tests/ui/splat/splat-non-fn-arg.rs: [missing] -> pass (J2)
  • dylib::version::test_version_check: pass -> [missing] (J6)

Stage 2

  • [ui] tests/ui/async-await/future-sizes/async-awaiting-fut.rs: ignore (only executed when the architecture is x86_64) -> pass (J0)
  • [ui] tests/ui/async-await/future-sizes/large-arg.rs: ignore (only executed when the architecture is x86_64) -> pass (J0)
  • [ui] tests/ui/print_type_sizes/async.rs: ignore (only executed when the architecture is x86_64) -> pass (J0)
  • [ui] tests/ui/feature-gates/feature-gate-splat.rs: [missing] -> pass (J1)
  • [ui] tests/ui/json/multibyte-rendered-ansi-issue-157148.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/improper-ctypes/async-extern-fn-next-solver-issue-156352.rs: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs: pass -> [missing] (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-1-modulo-regions.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-assoc-ty-binding-static.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-assoc-ty-binding-static.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-infer-resolved-to-param.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-infer-resolved-to-param.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-projection-static.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/marker_trait_attr/overlapping-impl-projection-static.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/proc-macro/proc-macro-decls.rs: [missing] -> pass (J1)
  • [ui] tests/ui/splat/splat-invalid.rs: [missing] -> pass (J1)
  • [ui] tests/ui/splat/splat-non-fn-arg.rs: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/future-sizes/async-awaiting-fut.rs: ignore (only executed when the architecture is x86_64) -> ignore (only executed when the pointer width is 64bit) (J3)
  • [ui] tests/ui/async-await/future-sizes/large-arg.rs: ignore (only executed when the architecture is x86_64) -> ignore (only executed when the pointer width is 64bit) (J3)
  • [ui] tests/ui/print_type_sizes/async.rs: ignore (only executed when the architecture is x86_64) -> ignore (only executed when the pointer width is 64bit) (J3)
  • [run-make] tests/run-make/doctests-test_harness: [missing] -> ignore (ignored when cross-compiling ((needs to run host tool binary))) (J4)
  • [run-make] tests/run-make/doctests-test_harness: [missing] -> pass (J5)
  • [ui] tests/ui/async-await/future-sizes/async-awaiting-fut.rs: ignore (only executed when the architecture is x86_64) -> ignore (ignored when randomizing layouts) (J7)
  • [ui] tests/ui/async-await/future-sizes/large-arg.rs: ignore (only executed when the architecture is x86_64) -> ignore (ignored when randomizing layouts) (J7)
  • [ui] tests/ui/print_type_sizes/async.rs: ignore (only executed when the architecture is x86_64) -> ignore (ignored when randomizing layouts) (J7)
  • [ui] tests/rustdoc-ui/doctest/test_harness.rs: [missing] -> pass (J8)

Additionally, 8 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 ab26b175979ee7b2cb3302dce204b99df96f7efb --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-distcheck: 1h 47m -> 2h 20m (+30.3%)
  2. dist-armv7-linux: 1h 15m -> 1h 33m (+23.9%)
  3. dist-i686-msvc: 2h 18m -> 1h 47m (-22.0%)
  4. dist-aarch64-apple: 2h 2m -> 1h 37m (-20.5%)
  5. pr-check-2: 40m 20s -> 32m 26s (-19.6%)
  6. test-various: 1h 44m -> 2h 4m (+18.4%)
  7. dist-i586-gnu-i586-i686-musl: 1h 34m -> 1h 17m (-18.4%)
  8. x86_64-msvc-ext2: 1h 52m -> 2h 9m (+15.4%)
  9. x86_64-msvc-ext3: 1h 48m -> 2h 3m (+13.6%)
  10. dist-aarch64-msvc: 1h 41m -> 1h 54m (+13.2%)
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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#148183 rustdoc: Test & document test_harness code block attribute 108f7ca9623af644fdd616024faa079821b3e8ca (link)
#153847 Fix marker trait winnowing depending on impl order b11367c3bc857e4526a66033f33cb3d9562da757 (link)
#156067 Fix async drop glue for Box 83fff8cef5f11d26d5c835faa323509d5c5813ee (link)
#156399 fix improper ctypes in Znext solver 7d25f503a9ae72d9408f8d5dbab629759bb4bfa2 (link)
#157166 Change type of async context parameter after state transfor… 0b580da10d3872a6d6130edf869ee309d4d42561 (link)
#157335 bootstrap: Handle dotted table keys when parsing bootstrap.… 637d5f9a003182f49360d636e8004718dfe2f65d (link)
#157338 Make Literal::byte_character_value work with bytes as well e602611e06171cb77fc14092fa4ab231a58c13ef (link)
#157410 Implement rustc_public::CrateDef{,Type} for FieldDef 45efcee535c51b8c0612fb7dc584cc52e55aa601 (link)
#157503 Disable tests/debuginfo/pretty-std.rs OsString cdb check c4c9876e5fe02c6897506a73e633ac8d7b9cdb31 (link)
#157571 Remove ProcMacro enum from proc macro ABI 3980b37f19c42df7dcdb260da3de23c9217b233d (link)
#157605 Arg splat experiment - syntax impl 2d16c470070415c291cedfa6325284a5fc5d43df (link)
#157630 Add multibyte JSON diagnostic regression test f4831a2b44677442976e1a360e48f78e8d003df1 (link)
#157633 Reorder impl restriction rendering and add bottom margin b38192c3f9a46e1af482ab3d4005040b09a12421 (link)
#157642 Report duplicate relaxed bounds during ast lowering 4e63d5128ef348d83131f92fd6bf42840dc818d9 (link)
#157652 fix doc for unicode normalization faq on casefold APIs 7409b37e3e62582ec7af78e2704f83656ea01014 (link)
#157661 Update to ar_archive_writer v0.5.2 cf648fa3f74e97503377e7906a01e1ce6e49c4a9 (link)
#157668 Add test for matches in rustc_must_match_exhaustively e81aac34bc44d3680e8c523c67dadb3bda8d6c54 (link)

previous master: d56483a91d

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ab26b17): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.5% [0.2%, 1.4%] 23
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.3%, -0.2%] 2

Max RSS (memory usage)

Results (primary 0.5%, secondary -0.0%)

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

mean range count
Regressions ❌
(primary)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
2.3% [0.9%, 3.3%] 4
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-1.1% [-2.2%, -0.3%] 8
All ❌✅ (primary) 0.5% [-2.1%, 3.2%] 2

Cycles

Results (secondary 2.4%)

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)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary 0.1%, secondary 1.8%)

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

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.1%] 13
Regressions ❌
(secondary)
1.8% [0.0%, 5.5%] 26
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.1%] 13

Bootstrap: 525.47s -> 516.59s (-1.69%)
Artifact size: 400.80 MiB -> 401.43 MiB (0.16%)

@rustbot rustbot added the perf-regression Performance regression. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-run-make Area: port run-make Makefiles to rmake.rs A-rustdoc-js Area: Rustdoc's JS front-end merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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-rust-analyzer Relevant to the rust-analyzer 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.