-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
"computing type of ...::{opaque#0}" query cycle in async fn w/ auto trait obligations. #104343
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code using GATs and the async feature
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8856ef117840a1d3b4be93441c2b36b1
I expected it to compile. For reference, the same code implemented using manual
.thenfuture chaining compiles as shown here:https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8cd834a4ff4d4b969d6ba1de9db91fee
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 Futuredesugaring + the "leaky" auto trait semantics of-> impl Trait.