Skip to content

fix: unused_unit suggests wrongly when unit never type fallback #14609

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
Apr 27, 2025

Conversation

profetia
Copy link
Contributor

@profetia profetia commented Apr 14, 2025

Closes #14577.

Migrate this lint to late pass and avoids unit_never_type_fallback since it is no longer permitted in Rust 2024.

changelog: [unused_unit] fix wrong suggestions when unit never type fallback

@rustbot
Copy link
Collaborator

rustbot commented Apr 14, 2025

r? @Jarcho

rustbot has assigned @Jarcho.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 14, 2025
@profetia
Copy link
Contributor Author

The migration looks fine now, but other tests began to fail in cargo uibless. I have no idea why this happen. Could you give me some help? @samueltardieu

@profetia profetia force-pushed the issue14577 branch 3 times, most recently from d9a3982 to 3e55b3b Compare April 15, 2025 13:33
@profetia profetia marked this pull request as ready for review April 15, 2025 13:34
@profetia profetia force-pushed the issue14577 branch 3 times, most recently from a40352c to a51cadf Compare April 17, 2025 12:54
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Apr 17, 2025
Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

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

Thank you.

@Jarcho Jarcho added this pull request to the merge queue Apr 27, 2025
Merged via the queue into rust-lang:master with commit 542762e Apr 27, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unused_unit triggers when the type annotation is needed to compile
4 participants