1
Fork 0

Replace Range::step_by checking with Iterator::step_by

This commit is contained in:
Oliver Schneider 2017-06-18 15:14:46 +02:00
parent 27727c4aff
commit 38925a55b7
7 changed files with 70 additions and 31 deletions

View file

@ -14,6 +14,16 @@ declare_deprecated_lint! {
"`.extend_from_slice(_)` is a faster way to extend a Vec by a slice"
}
/// **What it does:** Nothing. This lint has been deprecated.
///
/// **Deprecation reason:** `Range::step_by(0)` used to be linted since it's
/// an infinite iterator, which is better expressed by `iter::repeat`,
/// but the method has been removed for `Iterator::step_by` which panics
/// if given a zero
declare_deprecated_lint! {
pub RANGE_STEP_BY_ZERO,
"`iterator.step_by(0)` panics nowadays"
}
/// **What it does:** Nothing. This lint has been deprecated.
///