Coercion from non-capturing closure to fn ptr fails when return type is !
#66738
Labels
A-closures
Area: Closures (`|…| { … }`)
A-coercions
Area: implicit and explicit `expr as Type` coercions
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Usually, non-capturing closures can be coerced to
fn
ptrs. But somehow that seems to fail when the return type is!
:The error is
This fails even on nightly, where
!
should be stable as a type.Curiously, this works:
Cc @Centril
The text was updated successfully, but these errors were encountered: