-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-async-closures`async || {}``async || {}`A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutT-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
Code
#![feature(async_closure)]
pub fn f(x: &dyn AsyncFnOnce()) {}
Current output
error[E0191]: the value of the associated type `CallOnceFuture` in `AsyncFnOnce` must be specified
--> src/main.rs:3:18
|
3 | pub fn f(x: &dyn AsyncFnOnce()) {}
| ^^^^^^^^^^^^^ help: specify the associated type: `AsyncFnOnce()<CallOnceFuture = Type>`
Desired output
???
Rationale and extra context
The suggested replacement pub fn f(x: &dyn AsyncFnOnce()<CallOnceFuture = Type>) {}
is not valid syntax.
Since dyn Async*
is not supported, perhaps it should just say that? I don't know what the plans are here.
Other cases
Rust Version
rustc 1.85.0-nightly (a224f3807 2024-12-09)
binary: rustc
commit-hash: a224f3807e58afc9353510f1d556c607d367545d
commit-date: 2024-12-09
host: aarch64-apple-darwin
release: 1.85.0-nightly
LLVM version: 19.1.5
Anything else?
No response
MatrixDev and nazar-pc
Metadata
Metadata
Assignees
Labels
A-async-closures`async || {}``async || {}`A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-dyn-traitArea: trait objects, vtable layoutArea: trait objects, vtable layoutT-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.