Casting owned type to raw pointer has unclear error message #84213
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.
Given the following code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1a1c55703dee4ed2078b5c704bd1f379
The current output is:
I think, that in the context of casting to a pointer, the output in this case should make it clear that the error could be fixed by taking a reference to the type and cast the reference to a raw pointer.
Example:
The text was updated successfully, but these errors were encountered: