Skip to content

Docs.rs does not compile on nightly since nightly-2024-04-05 #2488

@dtolnay

Description

@dtolnay

This is to let you know that docs.rs is impacted by rust-lang/rust#119820, which is an upcoming intentional breaking change in Rust 1.79. There will need to be some code changes in docs.rs before updating to Rust 1.79.

$ cargo +nightly-2024-04-05 check

error: lifetime may not live long enough
  --> src/db/types.rs:4:66
   |
4  | #[derive(Debug, Clone, PartialEq, Eq, Serialize, FromSql, ToSql, sqlx::Type)]
   |                                                                  ^^^^^^^^^^
   |                                                                  |
   |                                                                  lifetime `'r` defined here
   |                                                                  requires that `'r` must outlive `'static`
   |
note: due to current limitations in the borrow checker, this implies a `'static` lifetime
  --> ~/.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
 --> src/db/types.rs:4:66
  |
4 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, FromSql, ToSql, sqlx::Type)]
  |                                                                  ^^^^^^^^^^ implementation of `sqlx::Decode` is not general enough
  |
  = note: `std::string::String` must implement `sqlx::Decode<'0, Postgres>`, for any lifetime `'0`...
  = note: ...but it actually implements `sqlx::Decode<'1, 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
 --> src/db/types.rs:4:66
  |
4 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, FromSql, ToSql, sqlx::Type)]
  |                                                                  ^^^^^^^^^^ implementation of `sqlx::Decode` is not general enough
  |
  = note: `Vec<std::string::String>` must implement `sqlx::Decode<'0, Postgres>`, for any lifetime `'0`...
  = note: ...but it actually implements `sqlx::Decode<'1, 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)

https://gist.github.com/lcnr/7c1c652f30567048ea240554a36ed95c#httpsgithubcomlaunchbadgesqlx-some-derives-of-sqlxtype has an analysis of how sqlx is involved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions