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>2021-01-20 07:24:34 +0000
committerbors <bors@rust-lang.org>2021-01-20 07:24:34 +0000
commitfb0d7f1714025efdd68e5e7464ac5a23eaf5dc97 (patch)
tree2fad486ca92efe97679f76e2022f2584929325e7 /src/test/codegen/src-hash-algorithm
parentd71dea40cf2a509093bf882b87878406523c4073 (diff)
parentd4bf59b6ef24042653951b69105a3a68542f3bbd (diff)
downloadrust-fb0d7f1714025efdd68e5e7464ac5a23eaf5dc97.tar.gz
rust-fb0d7f1714025efdd68e5e7464ac5a23eaf5dc97.zip
Auto merge of #6578 - MarijnS95:size-in-element-count-divide-by-byte-size, r=flip1995
size_of_in_element_count: Disable lint on division by byte-size

Fixes #6511

It is fairly common to divide some length in bytes by the byte-size of a single element before creating a `from_raw_parts` slice or similar operation. This lint would erroneously disallow such expressions.

Just in case, instead of simply disabling this lint in the RHS of a division, keep track of the inversion and enable it again on recursive division.

---

changelog: Do not trigger size_of_in_element_count when dividing by element size
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions