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

non_exhaustive_omitted_patterns lint is unstable #1154

Closed
dhardy opened this issue Mar 29, 2022 · 3 comments
Closed

non_exhaustive_omitted_patterns lint is unstable #1154

dhardy opened this issue Mar 29, 2022 · 3 comments

Comments

@dhardy
Copy link
Contributor

dhardy commented Mar 29, 2022

According to #1067, this lint was to be stabilised in Rust 1.57. It is not stable yet according to the tracking issue.

Maybe #1067 should be reverted?

@dtolnay
Copy link
Owner

dtolnay commented Mar 29, 2022

I think this is fine. All you need is some build able to discover when match arms are missing. It doesn't have to work in every toolchain in your CI in order for you to find out; the set of enum variants in the same version of syn is not gonna be different on your other compilers.

If you require that your stable build is the one that detects missing match arms, you would need to follow up with the compiler folks about getting the lint stabilized.

@dtolnay dtolnay closed this as completed Mar 29, 2022
@dhardy
Copy link
Contributor Author

dhardy commented Mar 29, 2022

I think it is a step backwards, considering the previous solution worked just fine. But never mind.

@dtolnay
Copy link
Owner

dtolnay commented Mar 29, 2022

I think it is a step forward because it's no longer possible for a crate to break its downstream users when a variant gets added.

Repository owner locked and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants