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

Clippy CI is currently failing #793

Closed
QuantumDancer opened this issue Apr 30, 2024 · 0 comments · Fixed by #794
Closed

Clippy CI is currently failing #793

QuantumDancer opened this issue Apr 30, 2024 · 0 comments · Fixed by #794

Comments

@QuantumDancer
Copy link
Contributor

Currently, the Clippy CI for AUDITOR is failing with:

error: lifetime may not live long enough
  --> auditor/src/domain/score.rs:34:41
   |
34 | #[derive(Debug, Serialize, Deserialize, sqlx::Type, Clone)]
   |                                         ^^^^^^^^^^
   |                                         |
   |                                         lifetime `'r` defined here
   |                                         requires that `'r` must outlive `'static`
   |
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-postgres-0.7.4/src/types/record.rs:97:12
   |
97 |         T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the derive macro `sqlx::Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error: implementation of `sqlx::Decode` is not general enough
  --> auditor/src/domain/score.rs:34:41
   |
34 | #[derive(Debug, Serialize, Deserialize, sqlx::Type, Clone)]
   |                                         ^^^^^^^^^^ implementation of `sqlx::Decode` is not general enough
   |
   = note: `domain::validname::ValidName` must implement `sqlx::Decode<'0, sqlx::Postgres>`, for any lifetime `'0`...
   = note: ...but it actually implements `sqlx::Decode<'1, sqlx::Postgres>`, for some specific lifetime `'1`
   = note: this error originates in the derive macro `sqlx::Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error: implementation of `sqlx::Decode` is not general enough
  --> auditor/src/domain/score.rs:34:41
   |
34 | #[derive(Debug, Serialize, Deserialize, sqlx::Type, Clone)]
   |                                         ^^^^^^^^^^ implementation of `sqlx::Decode` is not general enough
   |
   = note: `domain::validvalue::ValidValue` must implement `sqlx::Decode<'0, sqlx::Postgres>`, for any lifetime `'0`...
   = note: ...but it actually implements `sqlx::Decode<'1, sqlx::Postgres>`, for some specific lifetime `'1`
   = note: this error originates in the derive macro `sqlx::Type` (in Nightly builds, run with -Z macro-backtrace for more info)

As a reminder, we are using the beta channel to run clippy.

This error occurred after the beta channel has been updated to rustc 1.79.0-beta.1

We either fix this warnings now or move the cargo check to the stable channel, as was already done for the coverage (see #739)

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 a pull request may close this issue.

1 participant