Skip to content

Rollup of 14 pull requests#159634

Merged
rust-bors[bot] merged 43 commits into
rust-lang:mainfrom
jhpratt:rollup-TdibLWR
Jul 21, 2026
Merged

Rollup of 14 pull requests#159634
rust-bors[bot] merged 43 commits into
rust-lang:mainfrom
jhpratt:rollup-TdibLWR

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 21, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

chitao1234 and others added 30 commits July 5, 2026 17:45
Closures, coroutines, coroutine witnesses and coroutine closures use the
same syntax. This used to be copy-paste but gradually departed.
None of the currently public methods are accessible outside `std`, and are unused within. Therefore, they can be restricted to internal use.
Co-Authored-By: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
Co-Authored-By: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
Co-Authored-By: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
Add regression test for rust-lang#120328

Update closure-capture-in-loop-120328.rs

Co-Authored-By: adwin <adwinw01@gmail.com>
…e` in non-move closures

* Capture upvar by ref for `.use` in non-move closures

A plain `|| { x.use }` closure marked the upvar capture as `ByUse`,
which clones the value into the closure at construction time. The
`.use` in the body then clones again on every call, so the value was
cloned once more than the number of invocations.

A `ByUse` capture in a non-`move`/`use` closure can only originate from
a `.use` expression in the body; a `use ||` capture clause is handled by
`adjust_for_use_closure` instead. Capture such places by immutable
borrow so the `.use` clones once per evaluation and nothing is cloned
into the closure at construction.
* Add test for clone count of `.use` in non-move closure
the parsed attributes of an item were only fully populated after all
finalizers had run, so `finalize_check` (run during finalization) could
only inspect attribute *paths* via `FinalizeContext::all_attrs`, not the
parsed `AttributeKind`s.

split finalization into two passes: first run all finalizers to produce
the parsed attributes, then run the cross-attribute checks. The checks are
deferred via a new `AttributeParser::deferred_finalize_check`, and can now
inspect the fully parsed attributes through a new
`FinalizeContext::parsed_attrs` field.
the check that `#[rustc_pub_transparent]` is only applied to
`#[repr(transparent)]` types needs to see the parsed `Repr` attribute, so
it now lives in `RustcPubTransparentParser::finalize_check`, using the
freshly available `FinalizeContext::parsed_attrs`.
When configured with `rust.rpath = false` or using any other custom
library configurations, running `rustc` requires a library path too.
This was missing from `unstable-book-gen`'s new `rustc -Zhelp`.
And also the fields of `TokenCursor`.

It's good hygiene in general, and will allow larger changes to
`TokenCursor` down the road (e.g. hopefully avoiding the flattening of
token trees to a linear token stream).
…-value-diagnostics, r=petrochenkov

Improve cross-namespace name diagnostics

Close rust-lang#86290

Cross-namespace name matches now use the ordinary missing-name diagnostic while preserving its error code and suggestions. The diagnostic adds a note identifying the item found in another namespace, while same-namespace wrong-kind diagnostics remain unchanged.

The UI expectations cover cross-namespace combinations across the resolver suite, including preservation of existing suggestions.
…out-change-comment, r=nnethercote

Clarify the comment about stage1/stage2 discrepancy in input-stats test

I was very confused by this comment. The test in question breaks when you change AST types and the comment says "Type layout sometimes change" which seems to imply that you have to do the `ignore-stage1` flip to fix it. But we do these layout changes all the time and I haven't seen anybody to do this.

It only became clear only when I dug through history and found the last time the `ignore-stage1` was used here (on layout algorithm change in 2023). It's only relevant when type layouts change in _rustc output_, not in rustc source code.

r? nnethercote
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 21, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 21, 2026
@jhpratt

jhpratt commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 334b250 has been approved by jhpratt

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 21, 2026
Rollup of 14 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: b061c4a (b061c4aa3b11d6efb99985e6ab2a025bb5ed8d77)
Base parent: 87e5904 (87e5904f5eb6398af6b22eac2802c78934260c48)

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

rust-bors Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 7m 27s
Pushing cde3f8a 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 5a8cd23 (parent) -> cde3f8a (this PR)

Test differences

Show 454 test diffs

Stage 1

  • [ui (polonius)] tests/ui/compile-flags/invalid/codegen-option-typo-suggestion-issue-159482.rs#codegen: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/compile-flags/invalid/codegen-option-typo-suggestion-issue-159482.rs#unstable: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/ergonomic-clones/closure/dotuse-no-extra-capture-clone.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/parser/suggest-removing-extra-semicolon-in-item-lists.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/resolve/builtin-attribute-not-value.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/next-solver/closure-capture-in-loop-120328.rs: [missing] -> pass (J0)
  • [ui] tests/ui/compile-flags/invalid/codegen-option-typo-suggestion-issue-159482.rs#codegen: [missing] -> pass (J1)
  • [ui] tests/ui/compile-flags/invalid/codegen-option-typo-suggestion-issue-159482.rs#unstable: [missing] -> pass (J1)
  • [ui] tests/ui/ergonomic-clones/closure/dotuse-no-extra-capture-clone.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/suggest-removing-extra-semicolon-in-item-lists.rs: [missing] -> pass (J1)
  • [ui] tests/ui/resolve/builtin-attribute-not-value.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/closure-capture-in-loop-120328.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/compile-flags/invalid/codegen-option-typo-suggestion-issue-159482.rs#codegen: [missing] -> pass (J2)
  • [ui] tests/ui/compile-flags/invalid/codegen-option-typo-suggestion-issue-159482.rs#unstable: [missing] -> pass (J2)
  • [ui] tests/ui/ergonomic-clones/closure/dotuse-no-extra-capture-clone.rs: [missing] -> pass (J2)
  • [ui] tests/ui/parser/suggest-removing-extra-semicolon-in-item-lists.rs: [missing] -> pass (J2)
  • [ui] tests/ui/resolve/builtin-attribute-not-value.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/closure-capture-in-loop-120328.rs: [missing] -> pass (J2)

Additionally, 436 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 cde3f8aee5a30928872e2438e3f18238a3fa306c --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-rust-for-linux: 33m 51s -> 51m 46s (+52.9%)
  2. arm-android: 1h 13m -> 1h 40m (+36.1%)
  3. dist-sparcv9-solaris: 1h 11m -> 1h 34m (+31.7%)
  4. x86_64-gnu-llvm-22-2: 1h 19m -> 1h 44m (+31.4%)
  5. i686-msvc-2: 2h 5m -> 1h 28m (-29.6%)
  6. x86_64-gnu-gcc-core-tests: 11m 15s -> 14m 32s (+29.3%)
  7. x86_64-gnu-llvm-21-3: 1h 57m -> 1h 23m (-28.9%)
  8. dist-loongarch64-musl: 1h 23m -> 1h 46m (+27.6%)
  9. i686-gnu-nopt-2: 2h 24m -> 1h 45m (-27.1%)
  10. x86_64-gnu-nopt: 2h 34m -> 1h 53m (-26.5%)
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
#159307 Improve cross-namespace name diagnostics 918258d4447e4a2824f0bc80d8253fcf999ca2a4 (link)
#159543 Remove extra semicolons in parsing item lists 490af95668c101053ad83493d9801bcc5e0813d5 (link)
#157270 ergonomic_clones_dotuse_capture_by_ref: Capture upvar by re… 57b80aac11adabc044c013cc71234a41d41b99d1 (link)
#158496 Move check_rustc_pub_transparent into the attribute parser 217df3a0de52bbf9206039c1edc92f5da153a94e (link)
#158547 Move std::io::buffered to alloc::io 0410d653c937b638acc83f252a868e6f5c5c0fdc (link)
#158808 Filter host libstdc++ ABI flag in rustc_llvm cross builds fa8f43ca3f4bfb76390be38e4d6c6949f5d8b204 (link)
#159362 Add regression test for #120328 d6ea980d45026b94821105b2ff7e82372de99abf (link)
#159472 Support creating float constants in rustc_public mir 1d1c12a13599a394064932d6869da5f455df2df1 (link)
#159505 make rustdoc::bare_urls strip trailing periods from url 47cdb9314b2e804f839781a265d453f7d84b4487 (link)
#159568 Suggest close compiler options 9aa821171a250dea617f8c6baefb59af190cef8c (link)
#159578 Extract coroutine closure helper functions bf20993024ffdd21118657ef0880cfb5c09a5326 (link)
#159601 Make TokenTreeCursor private 2ed3d0f7e3dd4908648404d13b03d7e4cee5831a (link)
#159613 Set the rustc lib path for unstable-book-gen a27c940fb85948f957013142b112bb9e96125c7f (link)
#159616 Clarify the comment about stage1/stage2 discrepancy in inpu… 5f910ed9c4c8c6cef778c3de027a973fb67894a0 (link)

previous master: 5a8cd237d4

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

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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-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. 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.