Rust-GCC / Rust-GCC/gccrs

Name resolution error in `for` Trait bound

Open
#2,808 2 comments 2 reactions 3 assignees View on GitHub

@P-E-P is already working on this.

Since Jul 10, 2025.

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

Description

fn trait_as_argument<T: for<'a> Trait<'a, T>>(t: T) -> i32 {
    0
}

The inner T in Trait<'a, T> is not found.

Works in rustc 1.49

@CohenArthur

godbolt

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.