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.
@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

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (cde3f8a): 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.4% [0.4%, 0.4%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.2%, 0.4%] 4

Max RSS (memory usage)

Results (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)
5.8% [5.8%, 5.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.6%, -2.5%] 2
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 487.476s -> 486.164s (-0.27%)
Artifact size: 387.96 MiB -> 387.87 MiB (-0.02%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 21, 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-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. 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-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.