matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.87k stars 109 forks source link

unreachable patterns on 1.82 beta #261

Closed jayvdb closed 1 week ago

jayvdb commented 2 months ago
> cargo +beta clippy
warning: unreachable pattern
   --> src/lib.rs:593:17
    |
593 |                 Err(void) => match void {},
    |                 ^^^^^^^^^ matches no values because `unsync::OnceCell<T>::get_or_init::Void` is uninhabited
    |
    = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
    = note: `#[warn(unreachable_patterns)]` on by default

(four more times)

Might be a compiler bug https://github.com/rust-lang/rust/issues/129352

brodycj commented 1 month ago

possible workaround is to do export RUSTFLAGS", "-A unreachable_patterns"

matklad commented 1 week ago

That was a bug in rustc, it shouldn't be adding new unactionable warnings in the middle of an edition.