about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-04 05:52:44 +0000
committerbors <bors@rust-lang.org>2019-02-04 05:52:44 +0000
commit4259377ea61e4c830a49deda5be60c05a76a0a90 (patch)
treec1660674f2c26666179180cfbdadebe02e401b8a /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff
parent7bea43614cbd0d989a17fcf321f7bc0d8b641c0d (diff)
parentf3ee53d2259299e42bff3456a99def6ae3be8f84 (diff)
downloadrust-4259377ea61e4c830a49deda5be60c05a76a0a90.tar.gz
rust-4259377ea61e4c830a49deda5be60c05a76a0a90.zip
Auto merge of #3725 - mikerite:fix-2728, r=phansch
Fix `cast_sign_loss` false positive

This checks if the value is a non-negative constant before linting about
losing the sign.

Because the `constant` function doesn't handle const functions, we check if
the value is from a call to a `max_value` function directly. A utility method
called `get_def_path` was added to make checking for the function paths
easier.

Fixes #2728
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions