Const generics in closure arguments result in false "closure/generator type that references itself" error #85665
Labels
A-closures
Area: Closures (`|…| { … }`)
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
requires-incomplete-features
This issue requires the use of incomplete features.
requires-nightly
This issue requires a nightly compiler in some way.
I tried compiling this code:
The output is supposed to be
12345678
, but instead the compiler throws an error:However, the code above doesn't include closures that capture themselves or take themselves as an argument.
The bug is most likely related to const generics, because omitting
- PREFIX_LENGTH
such that theconst_generics
feature is not used fixes the compilation.new
function in this case is as follows:rustc --version --verbose
:The text was updated successfully, but these errors were encountered: