Auto merge of #7375 - djc:from-iter-pedantic, r=Manishearth

Move from-iter-instead-of-collect to pedantic

Since FromIterator will become part of the prelude, this lint being
warn by default is incongruous with the libs team position on the topic.

Fixes #7213.

---

changelog: moved [`from_iter_instead_of_collect`] to `pedantic` group
This commit is contained in:
bors 2021-06-19 08:01:58 +00:00
commit 7869e62557
2 changed files with 2 additions and 3 deletions

View file

@ -1092,6 +1092,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(methods::CLONED_INSTEAD_OF_COPIED),
LintId::of(methods::FILTER_MAP_NEXT),
LintId::of(methods::FLAT_MAP_OPTION),
LintId::of(methods::FROM_ITER_INSTEAD_OF_COLLECT),
LintId::of(methods::IMPLICIT_CLONE),
LintId::of(methods::INEFFICIENT_TO_STRING),
LintId::of(methods::MAP_FLATTEN),
@ -1288,7 +1289,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(methods::FILTER_MAP_IDENTITY),
LintId::of(methods::FILTER_NEXT),
LintId::of(methods::FLAT_MAP_IDENTITY),
LintId::of(methods::FROM_ITER_INSTEAD_OF_COLLECT),
LintId::of(methods::INSPECT_FOR_EACH),
LintId::of(methods::INTO_ITER_ON_REF),
LintId::of(methods::ITERATOR_STEP_BY_ZERO),
@ -1504,7 +1504,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
LintId::of(methods::BYTES_NTH),
LintId::of(methods::CHARS_LAST_CMP),
LintId::of(methods::CHARS_NEXT_CMP),
LintId::of(methods::FROM_ITER_INSTEAD_OF_COLLECT),
LintId::of(methods::INTO_ITER_ON_REF),
LintId::of(methods::ITER_CLONED_COLLECT),
LintId::of(methods::ITER_NEXT_SLICE),

View file

@ -1530,7 +1530,7 @@ declare_clippy_lint! {
/// assert_eq!(v, vec![5, 5, 5, 5, 5]);
/// ```
pub FROM_ITER_INSTEAD_OF_COLLECT,
style,
pedantic,
"use `.collect()` instead of `::from_iter()`"
}