Insufficient diagnostic info when casting usize
to fat pointer
#92125
Labels
A-coercions
Area: implicit and explicit `expr as Type` coercions
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: playground
The current output is:
Casting a
usize
to a regular pointer is possible, so it's a bit confusing at first that this doesn't work for fat pointers, especially if it's not obvious that*mut T
is a fat pointer here.The text was updated successfully, but these errors were encountered: