Rust-GCC / Rust-GCC/gccrs

Rustc behaviour mismatch with type alias

Open
#843 4 comments 0 reactions 2 assignees View on GitHub

@CohenArthur is already working on this.

Since Mar 24, 2023.

bug Rust Integrations
Dominant language
C++
Stars
2.9k
Forks
231
Avg merge
19h 55m
Merged PRs (30d)
67

Description

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. be27571c110d99fe55324a9c2b6622787b08fb52

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.