Skip to content

clippy: ignore conditional drop-non-drop error - #231

Merged
morehouse merged 1 commit into
lnfuzz:masterfrom
ekzyis:ignore-clippy-drop-non-drop
Sep 4, 2026
Merged

clippy: ignore conditional drop-non-drop error#231
morehouse merged 1 commit into
lnfuzz:masterfrom
ekzyis:ignore-clippy-drop-non-drop

Conversation

@ekzyis

@ekzyis ekzyis commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Without this commit, clippy without any flags fails:

error: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> smite/src/scenarios.rs:167:5
    |
167 |     drop(runner);
    |     ^^^^^^^^^^^^
    |
note: argument has type `runners::StdRunner`
   --> smite/src/scenarios.rs:167:10
    |
167 |     drop(runner);
    |          ^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_non_drop
    = note: `-D clippy::drop-non-drop` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::drop_non_drop)]`

error: could not compile `smite` (lib) due to 1 previous error

This is the case because only NyxRunner implements Drop, so with --all-features, there's no error with clippy.

This is confusing Claude, and I think this would confuse new people, too. When you run cargo clippy and you get an error, it looks unintentional like a bug.

Without this commit, `clippy` without any flags fails:

```
error: call to `std::mem::drop` with a value that does not implement `Drop`. Dropping such a type only extends its contained lifetimes
   --> smite/src/scenarios.rs:167:5
    |
167 |     drop(runner);
    |     ^^^^^^^^^^^^
    |
note: argument has type `runners::StdRunner`
   --> smite/src/scenarios.rs:167:10
    |
167 |     drop(runner);
    |          ^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#drop_non_drop
    = note: `-D clippy::drop-non-drop` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::drop_non_drop)]`

error: could not compile `smite` (lib) due to 1 previous error
```

This is the case because only `NyxRunner` implements `Drop`, so with
`--all-features`, there's no error with clippy.

This is confusing Claude, and I think this would confuse new people,
too. When you run `cargo clippy` and you get an error, it looks
unintentional like a bug.
@morehouse
morehouse merged commit f04b827 into lnfuzz:master Sep 4, 2026
5 checks passed
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