about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-15 17:52:35 +0200
committerGitHub <noreply@github.com>2023-06-15 17:52:35 +0200
commitf530016f50799aba1a39df2fb881324e6e9193aa (patch)
tree58e9b92529ff3ecc2491630730dad51483ef8b9d /tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parent4996b56ba9647d149265d03dcbd9ab837af3a1bb (diff)
parent211376927d02a032987d61a445648e7c1e6cc4ca (diff)
downloadrust-f530016f50799aba1a39df2fb881324e6e9193aa.tar.gz
rust-f530016f50799aba1a39df2fb881324e6e9193aa.zip
Rollup merge of #111212 - nicklimmm:issue-107896-fix, r=pnkfelix
Add casting suggestion when assigning negative 2's complement bin or hex literal to a size compatible signed integer

Fixes #107896

The issue stated the case for `iX::MIN` variants. This PR extends the cases for other negative values (in the 2's complement).

Leveraged sign bits to detect such cases.

Example cases:
- <img width="845" alt="image" src="https://user-images.githubusercontent.com/65026286/236289682-19859f59-a9c5-48c5-b15f-78a935fbfcec.png">
- <img width="831" alt="image" src="https://user-images.githubusercontent.com/65026286/236289805-5b16488d-9138-4363-a1b6-a5c027c50aba.png">
- <img width="912" alt="image" src="https://user-images.githubusercontent.com/65026286/236290065-685a9777-034b-4def-83a8-cc4e20b1ed0c.png">
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions