Skip to content

Missing match arms should not be reported on matches missing a body #15954

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

Closed
Veykril opened this issue Nov 23, 2023 · 1 comment · Fixed by #15971
Closed

Missing match arms should not be reported on matches missing a body #15954

Veykril opened this issue Nov 23, 2023 · 1 comment · Fixed by #15971
Assignees
Labels
A-diagnostics diagnostics / error reporting C-bug Category: bug E-easy

Comments

@Veykril
Copy link
Member

Veykril commented Nov 23, 2023

Or rather, we shouldn't do exhaustiveness checking for matches that are missing a body, they may hide the syntax error / make it less noticable.
Example that should not trigger exhaustiveness checking

match 0;
@Veykril Veykril added E-easy A-diagnostics diagnostics / error reporting C-bug Category: bug labels Nov 23, 2023
@Young-Flash
Copy link
Member

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics diagnostics / error reporting C-bug Category: bug E-easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants