Const closure weirdness #55272
Labels
A-closures
Area: closures (`|args| { .. }`)
A-const-eval
Area: constant evaluation (mir interpretation)
A-lifetimes
Area: lifetime related
The following compiles just fine:
However this does not:
It gives the following error message:
Why is this an error? The closure does not capture anything, so it's lifetime is
'static
, and const requires'static
.The text was updated successfully, but these errors were encountered: