Unable to see through associated type with where clause on GAT
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Ran into an issue when using GATs with a where clause. I wasn't able to find an existing issue, although I swear I've seen something similar reported before - apologies if this is a duplicate.
It looks like the Self::Output type isn't realized early enough? Ran with latest stable and nightly. This does work with the next trait solver. I feel like this can be reduced further, but I was unable to do so.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Rust Playground reproduction and compare its behavior on stable and nightly, then investigate the next trait solver result noted in the report. The issue is resolved when the GAT with a where clause can realize the Self::Output associated type without requiring the next trait solver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100