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

Remove unreachable void patterns once MSRV >= 1.82 #6356

Open
michaelsproul opened this issue Sep 5, 2024 · 0 comments
Open

Remove unreachable void patterns once MSRV >= 1.82 #6356

michaelsproul opened this issue Sep 5, 2024 · 0 comments

Comments

@michaelsproul
Copy link
Member

Description

In Rust 1.82 the compiler has gained the ability to recognise (and warn) for unreachable patterns due to uninhabited types like void::Void, ! and std::convert::Infallible.

In order to keep Lighthouse compiling on 1.82 beta and earlier versions, we've added #[allow(unreachable_patterns)] in a few places. Once the MSRV is 1.82 or greater we can remove these allows and the match arms that they apply to.

Present Behaviour

Describe the present behaviour of the application, with regards to this
issue.

Steps to resolve

Once Rust 1.82 is stable and we're OK with increasing the MSRV:

  1. Increase the MSRV to 1.82
  2. Remove all instances of void::unreachable and allow(unreachable_patterns) found using grep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant