Skip to content

Rustc behaviour mismatch with type alias #843

@philberty

Description

@philberty

Code

https://github.com/rust-lang/rust/blob/2595d038273a4c7746320efd06200764f99bd760/src/test/ui/qualified/qualified-path-params-2.rs

struct S;

trait Tr {
    type A;
}

impl Tr for S {
    type A = S;
}

impl S {
    fn f<T>() {}
}

type A = <S as Tr>::A::f<u8>;
//~^ ERROR ambiguous associated type

fn main() {}

see gccrs https://godbolt.org/z/1oGTafn1z

Meta

  • What version of Rust GCC were you using, git sha if possible. be27571

Metadata

Metadata

Type

No type

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions