about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-24 05:45:02 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-24 05:45:02 +0000
commit122da1de3bb45f73f97af6e8a94436907e9a3928 (patch)
treeaf9512a4262c5e53baec47f2e5afbbedf31cdf8d /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
parent3ff2c1f053d70d317d246d61008142c01cf68368 (diff)
parent553d01d9c74477a8172581aba00d179fcd63a78f (diff)
downloadrust-122da1de3bb45f73f97af6e8a94436907e9a3928.tar.gz
rust-122da1de3bb45f73f97af6e8a94436907e9a3928.zip
Merge #3339
3339: Check for known array length in `needless_range_loop` r=phansch a=HMPerson1

In `VarVisitor`, we now keep track of the type of the thing that was directly indexed and, if it's an array, check if the range's end is (or is past) the array's length.

Fixes  #3033

Co-authored-by: HMPerson1 <hmperson1@gmail.com>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions