Skip to content

Nightly build began to fail on sqlx #2855

Closed
@nyurik

Description

@nyurik

Bug Description

Due to a recent rustc regression (rated as critical), sqlx can no longer compile on the latest nightly. This is NOT due to anything in the SQLX crate. This issue exists only to track the upstream bug, and will be closed as soon as upstream is fixed. See rust-lang/rust#117598

Minimal Reproduction

$ rustup toolchain install nightly
$ rustup update
$ cargo +nightly build

Info

  • SQLx version: latest git and 0.7
  • SQLx features enabled: default or "sqlite", "runtime-tokio"
  • Database server and version: n/a
  • Operating system: Linux Mint
  • rustc --version: rustc 1.75.0-nightly (4b85902b4 2023-11-04)

Error

   Compiling sqlx-core v0.7.2 (/home/nyurik/dev/rust/sqlx/sqlx-core)
warning: unused import: `WriteBuffer`
  --> sqlx-core/src/net/socket/mod.rs:10:36
   |
10 | pub use buffered::{BufferedSocket, WriteBuffer};
   |                                    ^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

error[E0308]: mismatched types
   --> sqlx-core/src/any/database.rs:32:21
    |
32  |     type Database = Any;
    |                     ^^^ lifetime mismatch
    |
    = note: expected associated type `<any::database::Any as HasValueRef<'r>>::Database`
               found associated type `<any::database::Any as HasValueRef<'r>>::Database`
note: the required lifetime does not necessarily outlive the lifetime `'r` as defined here
   --> sqlx-core/src/any/database.rs:31:6
    |
31  | impl<'r> HasValueRef<'r> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> sqlx-core/src/database.rs:119:20
    |
119 |     type Database: Database;
    |                    ^^^^^^^^

error[E0308]: mismatched types
   --> sqlx-core/src/any/database.rs:32:21
    |
32  |     type Database = Any;
    |                     ^^^ lifetime mismatch
    |
    = note: expected associated type `<any::database::Any as HasValueRef<'r>>::Database`
               found associated type `<any::database::Any as HasValueRef<'r>>::Database`
note: the lifetime `'r` as defined here doesn't meet the lifetime requirements
   --> sqlx-core/src/any/database.rs:31:6
    |
31  | impl<'r> HasValueRef<'r> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> sqlx-core/src/database.rs:119:20
    |
119 |     type Database: Database;
    |                    ^^^^^^^^

error[E0308]: mismatched types
   --> sqlx-core/src/any/database.rs:38:21
    |
38  |     type Database = Any;
    |                     ^^^ lifetime mismatch
    |
    = note: expected associated type `<any::database::Any as HasStatement<'q>>::Database`
               found associated type `<any::database::Any as HasStatement<'q>>::Database`
note: the required lifetime does not necessarily outlive the lifetime `'q` as defined here
   --> sqlx-core/src/any/database.rs:37:6
    |
37  | impl<'q> HasStatement<'q> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> sqlx-core/src/database.rs:153:20
    |
153 |     type Database: Database;
    |                    ^^^^^^^^

error[E0308]: mismatched types
   --> sqlx-core/src/any/database.rs:38:21
    |
38  |     type Database = Any;
    |                     ^^^ lifetime mismatch
    |
    = note: expected associated type `<any::database::Any as HasStatement<'q>>::Database`
               found associated type `<any::database::Any as HasStatement<'q>>::Database`
note: the lifetime `'q` as defined here doesn't meet the lifetime requirements
   --> sqlx-core/src/any/database.rs:37:6
    |
37  | impl<'q> HasStatement<'q> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> sqlx-core/src/database.rs:153:20
    |
153 |     type Database: Database;
    |                    ^^^^^^^^

error[E0308]: mismatched types
   --> sqlx-core/src/any/database.rs:44:21
    |
44  |     type Database = Any;
    |                     ^^^ lifetime mismatch
    |
    = note: expected associated type `<any::database::Any as HasArguments<'q>>::Database`
               found associated type `<any::database::Any as HasArguments<'q>>::Database`
note: the required lifetime does not necessarily outlive the lifetime `'q` as defined here
   --> sqlx-core/src/any/database.rs:43:6
    |
43  | impl<'q> HasArguments<'q> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> sqlx-core/src/database.rs:135:20
    |
135 |     type Database: Database;
    |                    ^^^^^^^^

error[E0308]: mismatched types
   --> sqlx-core/src/any/database.rs:44:21
    |
44  |     type Database = Any;
    |                     ^^^ lifetime mismatch
    |
    = note: expected associated type `<any::database::Any as HasArguments<'q>>::Database`
               found associated type `<any::database::Any as HasArguments<'q>>::Database`
note: the lifetime `'q` as defined here doesn't meet the lifetime requirements
   --> sqlx-core/src/any/database.rs:43:6
    |
43  | impl<'q> HasArguments<'q> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> sqlx-core/src/database.rs:135:20
    |
135 |     type Database: Database;
    |                    ^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
warning: `sqlx-core` (lib) generated 1 warning (1 duplicate)
error: could not compile `sqlx-core` (lib) due to 6 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
warning: `sqlx-core` (lib) generated 1 warning
error: could not compile `sqlx-core` (lib) due to 6 previous errors; 1 warning emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbug:rustIndicates a bug or regression in Rust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions