Rollup of 5 pull requests - #160899
Merged
Merged
Conversation
when a closure literal is passed as a function argument and E0271 fires for a projection that isnt FnOnceOutput, the error now points at the closures return expression and labels the closure declaration with "this closure", mirroring the existing FnOnce handling in maybe_detailed_projection_msg, which cant recover the closure from self_ty alone. fixes rust-lang#42390
…unfilled bytes in a previous loop
On Windows, the UTF-16 to UTF-8 translation is made simpler by ensuring we don't split code points.:
…d filled in the buffer when reallocation occurs
This intermediate commit helps to preserve line history.
If there is non-trivial code in `main.rs`, then any items it touches need to be publicly exported from the library crate. Those public exports make it harder to identify unused code within bootstrap.
There is no need to re-export anything, so all `pub use` imports can be simplified to `use` and merged with their siblings.
…, r=oli-obk Implement derives for Reborrow and CoerceShared This adds built-in derive support for the experimental `Reborrow` and `CoerceShared` marker traits behind `#![feature(reborrow)]`. The derives generate the same marker impls users would write manually, while preserving the existing coherence and structural validation path for the experimental reborrow traits. ## Please note this impl: - Preserves generics, lifetimes, const params, and where clauses in generated impls. - Preserves multiple lifetime parameters in generated impls instead of duplicating the current experimental one-lifetime limitation in the derive layer. - Requires an explicit `CoerceShared` target type through the derive helper attribute. - Adds UI coverage for valid derives, feature gating, malformed helper attributes, unsupported item kinds, validation failures, and multiple-lifetime derive behavior. - Makes the derive layer future-proof for multiple lifetimes: it preserves all lifetime parameters and generates the same impl shape as a manual impl. @rustbot label F-reborrow Tracking: rust-lang#145612
…_init, r=Darksonn Fix perf regression in `Read::read_to_end` on short reads due to not checking if the cursor has initialized bytes This PR fixes rust-lang#158008. In particular, in rust-lang#150129, it refactored some code within `library/std/io/mod.rs` to utilize `BorrowedBuf::is_init` instead of manually checking `read_buf.init_len() == buf_len` to see if the read buffer had initialized bytes. However, the `BorrowedBuf` is never marked or set as init within this function, and I think this portion of the code: ```rust // SAFETY: These bytes were initialized but not filled in the previous loop unsafe { read_buf.set_init(initialized); } ``` was removed by mistake. This PR reverts the changes made by rust-lang#150129, so that we can mark the `BorrowedBuf`/`read_buf` as initialized using `BorrowedBuf::set_init` if in a previous iteration the cursor has initialized bytes. This would allow `max_read_size` to not be marked as `usize::max` if the read buffer contains initialized bytes. Closes: rust-lang#142872
bootstrap: Make `main.rs` a stub that calls into the library crate As with some other bootstrap tools (e.g. compiletest), bootstrap itself is built as a small binary crate (executable) that links to a larger library crate. If there is non-trivial code in `main.rs`, then any items it touches need to be publicly exported from the library crate. Those public exports make it harder to identify unused code within bootstrap. As far as I can tell, there is no compelling rule or principle that determines whether code should be in the entry point or in the library crate, other than historical inertia. This PR therefore takes all of the code from `main.rs`, and moves it into a new file `cli_main.rs` within the bootstrap library crate. That avoids the need for any public exports other than `cli_main::main` itself. There should be no change to bootstrap behaviour. --- This change makes it possible to change all of bootstrap's `pub` items to `pub(crate)`. That migration is left to a future PR, as it involves a fair bit of churn, and requires decisions on how to deal with pub items that are currently unused. Prior art: - rust-lang#147506
…turn-span, r=oli-obk point at closure return expression in non-`FnOnce` E0271 errors when a closure literal is passed as a function argument and E0271 fires for a projection that isnt `FnOnceOutput`. the error now points at the closures return expression and labels the closure declaration with "this closure". mirroring the existing FnOnce handling in `maybe_detailed_projection_msg`. which cant recover the closure from `self_ty` alone. fixes rust-lang#42390 r? @estebank
…t, r=oli-obk interpret: treat pattern and unsafe-binder as ABI-transparent This was suggested by @Jules-Bertholet in rust-lang#160658. I didn't follow all the discussions for those types. Making them transparent makes sense to me though we should make sure this is explicitly discussed as a stable guarantee when it comes to stabilizing those types. Tracking issues: rust-lang#123646, rust-lang#130516. r? @oli-obk
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 11, 2026
Rollup of 5 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-1 try-job: aarch64-apple-2 try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: i686-msvc-2
This comment has been minimized.
This comment has been minimized.
Contributor
Contributor
Collaborator
|
📌 Perf builds for each rolled up PR:
previous master: f76a50bb82 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 f76a50b (parent) -> a04c7a0 (this PR) Test differencesShow 93 test diffsStage 1
Stage 2
Additionally, 60 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 a04c7a037d59b6dedc9f921e84e391f13a257aa4 --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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
Read::read_to_endon short reads due to not checking if the cursor has initialized bytes #158083 (Fix perf regression inRead::read_to_endon short reads due to not checking if the cursor has initialized bytes)main.rsa stub that calls into the library crate #160829 (bootstrap: Makemain.rsa stub that calls into the library crate)FnOnceE0271 errors #159839 (point at closure return expression in non-FnOnceE0271 errors)r? @ghost
Create a similar rollup