Skip to content

fix: In "Wrap return type" assist, don't wrap exit points if they already have the right type #20061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

ChayimFriedman2
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 commented Jun 22, 2025

Fixes #20045.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2025
@@ -605,29 +634,39 @@ fn foo() -> Option<i32> {
check_assist_by_label(
wrap_return_type,
r#"
//- minicore: option
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needed to change because previously the type was the error type, which unifies with anything.

@ChayimFriedman2
Copy link
Contributor Author

I didn't change anything about on-type enter, so I will re-run CI, but if we're close to the limit maybe we should look at it.

@Veykril Veykril added this pull request to the merge queue Jun 24, 2025
Merged via the queue into rust-lang:master with commit ee012e0 Jun 24, 2025
25 of 28 checks passed
@lnicola
Copy link
Member

lnicola commented Jun 24, 2025

I didn't change anything about on-type enter, so I will re-run CI, but if we're close to the limit maybe we should look at it.

I think something happened around two weeks ago, it's been failing a lot more often than it used to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap return type in... Quick Fix should not wrap types that are already wrapped
4 participants