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

@@ -194,6 +194,10 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
"extend_from_slice",
"`.extend_from_slice(_)` is a faster way to extend a Vec by a slice",
);
store.register_removed(
"range_step_by_zero",
"`iterator.step_by(0)` panics nowadays",
);
store.register_removed(
"unstable_as_slice",
"`Vec::as_slice` has been stabilized in 1.7",
@@ -490,7 +494,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
ptr::CMP_NULL,
ptr::MUT_FROM_REF,
ptr::PTR_ARG,
ranges::RANGE_STEP_BY_ZERO,
ranges::ITERATOR_STEP_BY_ZERO,
ranges::RANGE_ZIP_WITH_LEN,
reference::DEREF_ADDROF,
regex::INVALID_REGEX,