Skip to content

Remove unreachable void patterns once MSRV >= 1.82 #6356

Open
@michaelsproul

Description

@michaelsproul

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions