New 2024-edition impl Trait
lifetime capture rules means opaques now capture higher-ranked lifetimes
#117647
Labels
A-edition-2024
Area: The 2024 edition
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Under the new 2024-edition lifetime capture rules (#117587), any
impl Trait
s that are defined inside the scope of afor<'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.
The text was updated successfully, but these errors were encountered: