-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Creating a new issue because this is, in my opinion, probably the most commonly encountered and annoying to work around issue caused by no-orphan rules:
struct NewType<T>(T);
impl<A, B: From<A>> From<NewType<A>> for NewType<B> {
fn from(a: NewType<A>) -> NewType<B> {
NewType(a.0.into())
}
}Namely, the special case where A == B overlaps with the generic impl<T> From<T> for T.
It's also an instance where it's usually trivial to prove that the overlapping implementations are equivalent, though I realise this is probably not a productive path toward a solution.
Metadata
Metadata
Assignees
Labels
No labels