Skip to content

New 2024-edition impl Trait lifetime capture rules means opaques now capture higher-ranked lifetimes #117647

Description

@compiler-errors

Under the new 2024-edition lifetime capture rules (#117587), any impl Traits that are defined inside the scope of a for<'a> binder now implicitly capture the lifetimes of that binder. This is intended behavior, and we'd like for that to work.

However, currently the type system doesn't support opaque type inference when the opaque captures one of these late-bound vars. This is blocked on #100503.

Opening this issue for a known-bug test.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-edition-2024Area: The 2024 editionA-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.T-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions