Skip to content

coherence regression from RFC 1023 #24241

Closed
@nikomatsakis

Description

@nikomatsakis

This example should not pass coherence, and it doesn't used to, but it does now:

trait From<U> {
    fn from(U)
    -> Self;
}

impl <T> From<T> for T {
    fn from(t: T) -> T { t }
}

impl <T11: From<U11>, U11> From<(U11,)> for (T11,) {
    #[allow(non_snake_case)]
    fn from(u: (U11,)) -> (T11,) { let (U11,) = u; (T11::from(U11),) }
}

fn main() { /* foo(From::from(("foo", 1u16))); */ }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions