Closed
Description
Due to the desugaring of async functions, the adt_const_params
feature prevents usage of non-numeric const params as parameters to async functions, or to impl blocks containing async functions.
For example:
#![feature(adt_const_params)]
pub async fn foo<const X: &'static str>() {}
yields the following error:
error: const parameter `X` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> src/lib.rs:3:43
|
3 | pub async fn foo<const X: &'static str>() {}
| ^^
Metadata
Metadata
Assignees
Labels
Area: const generics (parameters and arguments)Category: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.`#![feature(adt_const_params)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Relevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.ICE tracked in rust-lang/glacier.