Error message on casting negative numbers to usize is quite unhelpful #76413
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code:
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=04afbf8753fe268ea47b7b3fae6f897c
Error message:
Somehow, in one case this
1
in the-1
expression is unsigned, but in the other case it is signed and everything is fine.The text was updated successfully, but these errors were encountered: