You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error occurred while writing code with sqlx in the macro expansion the code is marked with #[allow(clippy::all)] but the lints arithmetic_side_effects and missing_panic_docs still fire.
The second one might still make sense to keep because it CAN panic but in the sqlx sense that should never happen.
Reproducer
I tried this code:
Any sqlx query with bind parameters should work
sqlx::query_as!(Foo,"SELECT boo, baz FROM Foos WHERE boo > $1 AND baz < $2",10,20)
I expected to see this happen:
No errors reported
Instead, this happened:
Clippy reports arithmetic_side_effects because it increments the bind parameter count. Also it reports missing_panic_docs because sqlx panics if the database schema is wrong.
#[allow(clippy::arithmetic_side_effects, clippy::missing_panic_docs)]{ sqlx::query_as!(Foo,"SELECT boo, baz FROM Foos WHERE boo > $1 AND baz < $2",10,20)}
But the lints should be updated to ignore proc macros instead.
Summary
This error occurred while writing code with
sqlx
in the macro expansion the code is marked with#[allow(clippy::all)]
but the lintsarithmetic_side_effects
andmissing_panic_docs
still fire.The second one might still make sense to keep because it CAN panic but in the sqlx sense that should never happen.
Reproducer
I tried this code:
Any sqlx query with bind parameters should work
I expected to see this happen:
No errors reported
Instead, this happened:
Clippy reports
arithmetic_side_effects
because it increments the bind parameter count. Also it reportsmissing_panic_docs
because sqlx panics if the database schema is wrong.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: