Skip to content

Unable to see through associated type with where clause on GAT #122745

Open
@benluelo

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.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=84875b21dcdc81ddc2e1526c2e9b6cc5

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-GATsArea: Generic associated types (GATs)A-associated-itemsArea: Associated items (types, constants & functions)A-trait-systemArea: Trait systemC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions