Skip to content

Conversation

@bim9262
Copy link
Collaborator

@bim9262 bim9262 commented Dec 16, 2025

No description provided.

}

/// Restart in-place
#[allow(unreachable_code)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ammgws can you confirm if you think this is the best way to work around the errors:

error: unreachable expression
  --> src/main.rs:89:5
   |
88 |     nix::unistd::execvp(&exe, &arg).unwrap();
   |     ---------------------------------------- any code following this expression is unreachable
89 |     unreachable!();
   |     ^^^^^^^^^^^^^^ unreachable expression
   |
note: this expression has type `std::convert::Infallible`, which is uninhabited
  --> src/main.rs:88:5
   |
88 |     nix::unistd::execvp(&exe, &arg).unwrap();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: `-D unreachable-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unreachable_code)]`

Copy link
Collaborator

@ammgws ammgws Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this is hitting now; this has passed before. Interestingly running with nightly (clippy 0.1.94 (0208ee09be 2025-12-14) does not generate this error:

> cargo +nightly clippy 2>| rg unreach                                                                                                   (v0.35.0)|22ms|14:37:51
[0|1]>

Only when I run with stable, which on my system is clippy 0.1.92 (ded5c06cf2 2025-12-08)

>cargo +stable clippy 2>| rg unreach                                                                                               (v0.35.0)|0.2s|14:39:27
warning: unreachable expression
   |     ---------------------------------------- any code following this expression is unreachable
89 |     unreachable!();
   |     ^^^^^^^^^^^^^^ unreachable expression
   = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default

So perhaps we can wait this one out a bit?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants