Incompatibility between axum_macros::debug_handler
and Clippy
#8683
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
T-macros
Type: Issues with macros and macro expansion
Summary
We try to use as many lints as possible on our project, so that issues are caught as early as possible. That's why we use Clippy for many extra lints that are useful.
There is one lint that fails when using
#[axum_macros::debug_handler]
on any axum handler:clippy::missing-docs-in-private-items
Removing the
#[axum_macros::debug_handler]
attribute makes the error go away.Presumably,
axum_macros
generates some functions that are not documented during generation and as such get caught by Clippy. It's not possible to fix the lint rule requirements as a user of the lint or the macro. I'm not familiar with how Clippy normally deals with generated code that is never seen or accessed directly by a developer.Lint Name
clippy::missing-docs-in-private-items
Reproducer
Cargo.toml
:src/main.rs
:How to enable the additional lints:
RUSTFLAGS="-D warnings -D missing_docs -D clippy::doc_markdown -D clippy::missing_docs_in_private_items" cargo clippy
The error output from running
cargo clippy
:Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: