about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-06 00:26:18 +0000
committerbors <bors@rust-lang.org>2022-05-06 00:26:18 +0000
commit5dad51736ce13f8d8e41f2cfa83cc2c8e09b715b (patch)
tree08fedfc2e9af35c12e4a7f457edf2b1df0a02db6 /src/test/codegen/src-hash-algorithm
parentbf7182c8e129582fded48676801aab3213c6e7b6 (diff)
parent6ff77b96f11143cf63f3522e4ffee4568b72330c (diff)
downloadrust-5dad51736ce13f8d8e41f2cfa83cc2c8e09b715b.tar.gz
rust-5dad51736ce13f8d8e41f2cfa83cc2c8e09b715b.zip
Auto merge of #8778 - sunfishcode:main, r=giraffate
Fix `cast_lossless` to avoid warning on `usize` to `f64` conversion.

Previously, the `cast_lossless` lint would issue a warning on code that
converted a `usize` value to `f64`, on 32-bit targets.

`usize` to `f64` is a lossless cast on 32-bit targets, however there is
no corresponding `f64::from` that takes a `usize`, so `cast_lossless`'s
suggested replacement does not compile.

This PR disables the lint in the case of casting from `usize` or `isize`.

Fixes #3689.

changelog: [`cast_lossless`] no longer gives wrong suggestion on usize,isize->f64
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions