Rollup of 14 pull requests#159634
Conversation
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.
This comment has been minimized.
This comment has been minimized.
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-*
This comment has been minimized.
This comment has been minimized.
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 differencesShow 454 test diffsStage 1
Stage 2
Additionally, 436 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard cde3f8aee5a30928872e2438e3f18238a3fa306c --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
previous master: 5a8cd237d4 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
|
Finished benchmarking commit (cde3f8a): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
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.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 487.476s -> 486.164s (-0.27%) |
Successful merges:
.usein non-move closures #157270 (ergonomic_clones_dotuse_capture_by_ref: Capture upvar by ref for.usein non-move closures)check_rustc_pub_transparentinto the attribute parser #158496 (Movecheck_rustc_pub_transparentinto the attribute parser)std::io::bufferedtoalloc::io#158547 (Movestd::io::bufferedtoalloc::io)-Znext-solver: ICE with closure capturing iterated variable in 2021 edition #120328)TokenTreeCursorprivate #159601 (MakeTokenTreeCursorprivate)r? @ghost
Create a similar rollup