-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impl AsyncFn
inference error leaks confusing internal_implementation_detail::AsyncFnKindHelper
trait constraint requirement
#137905
Labels
C-bug
Category: This is a bug.
Comments
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this issue
Mar 5, 2025
…r, r=oli-obk Improve error message for `AsyncFn` trait failure for RPIT Use a `WellFormedDerived` obligation cause to make sure we can turn an `AsyncFnKindHelper` trait goal into its parent `AsyncFn*` goal, then fix the logic for reporting `AsyncFn*` kind mismatches. Best reviewed without whitespace. Fixes rust-lang#137905 r? oli-obk
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this issue
Mar 5, 2025
…r, r=oli-obk Improve error message for `AsyncFn` trait failure for RPIT Use a `WellFormedDerived` obligation cause to make sure we can turn an `AsyncFnKindHelper` trait goal into its parent `AsyncFn*` goal, then fix the logic for reporting `AsyncFn*` kind mismatches. Best reviewed without whitespace. Fixes rust-lang#137905 r? oli-obk
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Mar 6, 2025
…r, r=oli-obk Improve error message for `AsyncFn` trait failure for RPIT Use a `WellFormedDerived` obligation cause to make sure we can turn an `AsyncFnKindHelper` trait goal into its parent `AsyncFn*` goal, then fix the logic for reporting `AsyncFn*` kind mismatches. Best reviewed without whitespace. Fixes rust-lang#137905 r? oli-obk
Noratrieb
added a commit
to Noratrieb/rust
that referenced
this issue
Mar 6, 2025
…r, r=oli-obk Improve error message for `AsyncFn` trait failure for RPIT Use a `WellFormedDerived` obligation cause to make sure we can turn an `AsyncFnKindHelper` trait goal into its parent `AsyncFn*` goal, then fix the logic for reporting `AsyncFn*` kind mismatches. Best reviewed without whitespace. Fixes rust-lang#137905 r? oli-obk
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Mar 6, 2025
…r, r=oli-obk Improve error message for `AsyncFn` trait failure for RPIT Use a `WellFormedDerived` obligation cause to make sure we can turn an `AsyncFnKindHelper` trait goal into its parent `AsyncFn*` goal, then fix the logic for reporting `AsyncFn*` kind mismatches. Best reviewed without whitespace. Fixes rust-lang#137905 r? oli-obk
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 7, 2025
Rollup merge of rust-lang#137910 - compiler-errors:async-fn-goal-error, r=oli-obk Improve error message for `AsyncFn` trait failure for RPIT Use a `WellFormedDerived` obligation cause to make sure we can turn an `AsyncFnKindHelper` trait goal into its parent `AsyncFn*` goal, then fix the logic for reporting `AsyncFn*` kind mismatches. Best reviewed without whitespace. Fixes rust-lang#137905 r? oli-obk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal repro:
Error message:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1417c51240bb454a094b23c524191862
Changing the code to directly return the async closure instead of binding it to a variable produces a more reasonable (but still not ideal) error message:
This issue was originally reported on URLO: https://users.rust-lang.org/t/interesting-issue-with-new-async-closures-with-very-cryptic-error-message/126470
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: