Invalid cast error when trying to cast a closure to a function pointer should mention captured variables #128078
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
I forgot a closure was capturing a variable while I was refactoring and setting up an array of function pointers. I had to double check the reference to figure out what the error was referring to.
Other cases
No response
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: