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

Fix unreachable patterns #90

Closed
notgull opened this issue Sep 8, 2024 · 3 comments · Fixed by #92
Closed

Fix unreachable patterns #90

notgull opened this issue Sep 8, 2024 · 3 comments · Fixed by #92

Comments

@notgull
Copy link
Member

notgull commented Sep 8, 2024

No description provided.

@jayvdb
Copy link
Contributor

jayvdb commented Sep 11, 2024

To add a bit more detail, on beta 1.82 & nightly

> cargo +beta build
   Compiling crossbeam-utils v0.8.20
   Compiling pin-project-lite v0.2.14
   Compiling parking v2.2.1
   Compiling concurrent-queue v2.5.0
   Compiling event-listener v5.3.1
   Compiling event-listener-strategy v0.5.2
   Compiling async-lock v3.4.0 (/home/jayvdb/rust/async-lock)
warning: unreachable pattern
   --> src/once_cell.rs:487:13
    |
487 |             Err(infallible) => match infallible {},
    |             ^^^^^^^^^^^^^^^ matches no values because `Infallible` 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

warning: unreachable pattern
   --> src/once_cell.rs:522:13
    |
522 |             Err(infallible) => match infallible {},
    |             ^^^^^^^^^^^^^^^ matches no values because `Infallible` is uninhabited
    |
    = note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types

warning: `async-lock` (lib) generated 2 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.67s

@taiki-e
Copy link
Collaborator

taiki-e commented Sep 11, 2024

I think it's a compiler bug: rust-lang/rust#129352

@jayvdb
Copy link
Contributor

jayvdb commented Sep 11, 2024

Ok, also raised "upstream" at matklad/once_cell#261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants