Skip to content

regression: error compiling sqlx #117660

Closed as not planned
Closed as not planned
@Noratrieb

Description

@Noratrieb

Code

I tried this code:

[package]
name = "a"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sqlx = "=0.7.2"

I expected to see this happen: it compiles

Instead, this happened:

error[E0308]: mismatched types
   --> /home/nilsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-core-0.7.2/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
   --> /home/nilsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-core-0.7.2/src/any/database.rs:31:6
    |
31  | impl<'r> HasValueRef<'r> for Any {
    |      ^^
note: the lifetime requirement is introduced here
   --> /home/nilsh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-core-0.7.2/src/database.rs:119:20
    |
119 |     type Database: Database;
    |                    ^^^^^^^^

searched nightlies: from nightly-2023-11-01 to nightly-2023-11-07
regressed nightly: nightly-2023-11-04
searched commit range: a2f5f96...1bb6553
regressed commit: 2520ca8

bisected with cargo-bisect-rustc v0.6.7

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc 2023-11-01 --end 2023-11-07 --access github --regress error

regressed in #117131
looks like you did a new projection oops @compiler-errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions