-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)Area: auto traits (e.g., `auto trait Send {}`)A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried this code using GATs and the async feature
I expected it to compile. For reference, the same code implemented using manual .then
future chaining compiles as shown here:
Note that the above are built with nightly 1.67, but the same error occurs on stable 1.65.
Tagging @jackh726 as suggested by @jyn514
Note that GATs are an amazing feature that I'm incredibly grateful to you for implementing, and also that I'm not surprised that my extremely galaxy brained Haskell shenanigans hit some edge case.
EDIT(@eddyb): changed title as per #104343 (comment) - this does not seem to involve GATs at all, just the unfortunate interaction of async fn
's -> impl Future
desugaring + the "leaky" auto trait semantics of -> impl Trait
.
workingjubilee
Metadata
Metadata
Assignees
Labels
A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)Area: auto traits (e.g., `auto trait Send {}`)A-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.