1
Fork 0

remove nondeterminism by adjusting thresholds

This commit is contained in:
Oliver Schneider 2016-12-21 10:25:14 +01:00
parent 299d7be132
commit ed9d71f2c9
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46
30 changed files with 157 additions and 133 deletions

View file

@ -107,9 +107,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ArrayIndexing {
}
/// Returns an option containing a tuple with the start and end (exclusive) of the range.
fn to_const_range(start: Option<Option<ConstVal>>, end: Option<Option<ConstVal>>, limits: RangeLimits,
array_size: ConstInt)
-> Option<(ConstInt, ConstInt)> {
fn to_const_range(start: Option<Option<ConstVal>>, end: Option<Option<ConstVal>>, limits: RangeLimits, array_size: ConstInt)
-> Option<(ConstInt, ConstInt)> {
let start = match start {
Some(Some(ConstVal::Integral(x))) => x,
Some(_) => return None,