Skip to content

Rollup of 9 pull requests#156663

Closed
JonathanBrouwer wants to merge 25 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-a2fBwa7
Closed

Rollup of 9 pull requests#156663
JonathanBrouwer wants to merge 25 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-a2fBwa7

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@JonathanBrouwer JonathanBrouwer commented May 17, 2026

Successful merges:

r? @ghost

Create a similar rollup

thiago-fealves and others added 25 commits May 4, 2026 10:55
…r` is found

This commit adds a diagnostic suggestion to help users who forget to
call `.collect()` when they have an iterator and the function or
variable expects a `String`.

The logic checks if the expected type is `std::string::String` and if
the found type implements the `Iterator` trait, if so the compiler
provides a suggestion to add `.collect()`

Includes also a UI test to verify if the suggestion appears correctly
Co-authored-by: Qai Juang <qaijuang@gmail.com>
This works, but I couldn't find any test cases for it.
…, r=estebank

Add interior-mutability suggestion to `static_mut_refs`

Closes rust-lang#151131
r? @estebank

I've skipped to expand catching below code as a mutable _reference_ shouldn't be involved (maybe a new lint would be needed?):
```rs
static mut COUNTER: u64 = 0;
fn main() {
    unsafe { COUNTER = 1 };
}
```
…ing, r=estebank

compiler: suggest `.collect()` when `String` is expected and `Iterator` is found

This commit adds a diagnostic suggestion to help users who forget to call `.collect()` when they have an iterator and the function or variable expects a `String`.

The logic checks if the expected type is `std::string::String` and if the found type implements the `Iterator` trait, if so the compiler provides a suggestion to add `.collect()`

Includes also a UI test to verify if the suggestion appears correctly
…=mejrs

Test EII UI tests with prefer-dynamic

Tracking issue: rust-lang#125418

Remove `no-prefer-dynamic` from the EII UI tests now that rust-lang#153648 fixed exporting EII declaration aliases from dylibs.

Fixes rust-lang#151271.

Tested with:

```sh
python3 x.py test tests/ui/eii --force-rerun
```
…1999

Avoid rustfix suggestions for macro-expanded unused imports

Avoid emitting rustfix suggestions for unused imports when the removal span is not directly editable.

Closes rust-lang#147855
…uillaumeGomez

rustdoc: add test case for `-Drustdoc::` and `--cap-lints`

This works, but I couldn't find any test cases for it.
…est, r=mu001999

Add regression test for issue rust-lang#41261

Adds a regression test for rust-lang#41261.
…r, r=JohnTitor

rename unexpected_try_recover function

While reading the code, the doc comment and the name of the function `unexpected_try_recover` confused me. The doc said it tries to recover if it is a closing delimiter but I see no recovering code and the function always return an error.

So I change the name of the function to `unexpected_err` and change the return value to `Diag<'a>`. I also update the doc comment.
…=Kivooeo

minor `rustc_mir_transform` cleanup

Some minor things I noticed here and there while reading though code
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 17, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. labels May 17, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@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-2

Removed a few from #156658 while I figure out which pr failed it

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

📌 Commit fa73156 has been approved by JonathanBrouwer

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 May 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

⌛ Trying commit fa73156 with merge f87296a

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/25989451829

rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
Rollup of 9 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-2
@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

This pull request was unapproved due to being closed.

@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

Try build cancelled. Cancelled workflows:

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

Labels

rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.