Skip to content
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

Add lint for functions which never return #13565

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GnomedDev
Copy link
Contributor

@GnomedDev GnomedDev commented Oct 19, 2024

This is currently draft as built on-top of #13557.

Closes #12290.

This is implemented by inspecting rustc's NeverToAny type adjustments, meaning we do not have to solve the halting problem ourselves (that's rustc's job).

I've chosen pedantic as:

  • Users may want to avoid the magic of !
  • It doesn't make a significant performance/readability improvement
  • It can be noisy, especially during development.

@rustbot
Copy link
Collaborator

rustbot commented Oct 19, 2024

r? @Alexendoo

rustbot has assigned @Alexendoo.
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 Oct 19, 2024
@GnomedDev GnomedDev marked this pull request as draft October 19, 2024 00:43
@GnomedDev GnomedDev force-pushed the never-return branch 2 times, most recently from e5fe67a to 2da4866 Compare October 19, 2024 10:59
@bors
Copy link
Collaborator

bors commented Oct 21, 2024

☔ The latest upstream changes (presumably #13567) made this pull request unmergeable. Please resolve the merge conflicts.

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.

Suggest ! return type for functions that never return a value
4 participants