-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-coherenceArea: CoherenceArea: CoherenceA-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Relevant to the types team, which will review and decide on the PR/issue.
Description
This small example:
use ::std::borrow::ToOwned;
struct Foo;
impl From<<bool as ToOwned>::Owned> for Foo {
fn from(v: <bool as ToOwned>::Owned) -> Foo {
unimplemented!()
}
}causes the error E0119: "conflicting implementations of trait std::convert::From<Foo> for type Foo", though I have not written an implementation of From<Foo> anywhere. <bool as ToOwned>::Owned should be synonymous with bool, but in this case it doesn't appear to be, as replacing the first use of the associated type with bool stops the error.
I have observed this on stable, beta, and the latest nightly.
Metadata
Metadata
Assignees
Labels
A-coherenceArea: CoherenceArea: CoherenceA-type-systemArea: Type systemArea: Type systemC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.Relevant to the types team, which will review and decide on the PR/issue.