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
{{ message }}
Repository navigation
1.97 beta regression: "conflicting implementations of trait" #157407
A-coherenceArea: CoherenceA-trait-systemArea: Trait systemC-bugCategory: This is a bug.P-highHigh priorityS-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.
[package]
name = "repro"version = "0.1.0"edition = "2024"
[dependencies]
sqlx = { version = "0.9.0", features = ["postgres"] }
use sqlx::decode::Decode;use sqlx::postgres::PgRow;use sqlx::{Error,FromRow,Row};pubstructActivityType;pubstructChallengeRecord;implFromRow<'_,PgRow>forChallengeRecord{fnfrom_row(_:&'_PgRow) -> Result<Self,Error>{todo!()}}impl<'a,R:Row>FromRow<'a,R>forChallengeRecordwhereActivityType:Decode<'a,R::Database>,{fnfrom_row(__row:&'aR) -> sqlx::Result<Self>{todo!()}}
Error on beta:
error[E0119]: conflicting implementations of trait `FromRow<'_, PgRow>` for type `ChallengeRecord`
--> src/lib.rs:15:1
|
9 | impl FromRow<'_, PgRow> for ChallengeRecord {
| ------------------------------------------- first implementation here
...
15 | / impl<'a, R: Row> FromRow<'a, R> for ChallengeRecord
16 | | where
17 | | ActivityType: Decode<'a, R::Database>,
| |__________________________________________^ conflicting implementation for `ChallengeRecord`
|
= note: downstream crates may implement trait `sqlx::Decode<'_, _>` for type `ActivityType`
For more information about this error, try `rustc --explain E0119`.
error: could not compile `repro` (lib) due to 1 previous error
use dep::{PgRow,Row};pubtraitFromRow{}pubtraitDecode<T>{}pubstructActivityType;implFromRowforPgRow{}impl<R:Row>FromRowforRwhereActivityType:Decode<R::Database>{}
Error output on beta
error[E0119]: conflicting implementations of trait `FromRow` for type `PgRow`
--> src/lib.rs:10:1
|
8 | impl FromRow for PgRow {}
| ---------------------- first implementation here
9 |
10 | impl<R: Row> FromRow for R where ActivityType: Decode<R::Database> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `PgRow`
|
= note: upstream crates may add a new impl of trait `dep::Row` for type `dep::PgRow` in future versions
= note: downstream crates may implement trait `Decode<_>` for type `ActivityType`
For more information about this error, try `rustc --explain E0119`.
A-coherenceArea: CoherenceA-trait-systemArea: Trait systemC-bugCategory: This is a bug.P-highHigh priorityS-has-bisectionStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.
Activity
theemathas commentedon Jun 5, 2026
Smaller reproducer:
Error on beta:
theemathas commentedon Jun 5, 2026
Minimized:
dep/src/lib.rs
src/lib.rs
Error output on beta
theemathas commentedon Jun 5, 2026
Bisection results:
Regressed in #155767. cc @adminwhite @lcnr
6 remaining items
lcnr commentedon Jun 8, 2026
see the discussion on zulip https://rust-lang.zulipchat.com/#narrow/channel/326866-t-types.2Fnominated/topic/.23157407.3A.201.2E97.20beta.20regression.3A.20.22conflicting.20implementations.E2.80.A6/with/601113797
bit-aloo commentedon Jun 8, 2026
@rustbot claim
Auto merge of #157617 - Shourya742:2026-06-08-donot-eagerly-normalize…
Auto merge of #157617 - Shourya742:2026-06-08-donot-eagerly-normalize…
theemathas commentedon Jun 13, 2026
Reopening to track beta backport.
Auto merge of #157617 - Shourya742:2026-06-08-donot-eagerly-normalize…
apiraino commentedon Jun 25, 2026
I assume this issue has been discussed by T-types (see comment)
@rustbot label -i-types-nominated
theemathas commentedon Jun 26, 2026
Fixed by #158420