Skip to content

Commit a40fd6d

Browse files
committed
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.
1 parent d184413 commit a40fd6d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10921092
LintId::of(methods::CLONED_INSTEAD_OF_COPIED),
10931093
LintId::of(methods::FILTER_MAP_NEXT),
10941094
LintId::of(methods::FLAT_MAP_OPTION),
1095+
LintId::of(methods::FROM_ITER_INSTEAD_OF_COLLECT),
10951096
LintId::of(methods::IMPLICIT_CLONE),
10961097
LintId::of(methods::INEFFICIENT_TO_STRING),
10971098
LintId::of(methods::MAP_FLATTEN),
@@ -1288,7 +1289,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
12881289
LintId::of(methods::FILTER_MAP_IDENTITY),
12891290
LintId::of(methods::FILTER_NEXT),
12901291
LintId::of(methods::FLAT_MAP_IDENTITY),
1291-
LintId::of(methods::FROM_ITER_INSTEAD_OF_COLLECT),
12921292
LintId::of(methods::INSPECT_FOR_EACH),
12931293
LintId::of(methods::INTO_ITER_ON_REF),
12941294
LintId::of(methods::ITERATOR_STEP_BY_ZERO),
@@ -1504,7 +1504,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15041504
LintId::of(methods::BYTES_NTH),
15051505
LintId::of(methods::CHARS_LAST_CMP),
15061506
LintId::of(methods::CHARS_NEXT_CMP),
1507-
LintId::of(methods::FROM_ITER_INSTEAD_OF_COLLECT),
15081507
LintId::of(methods::INTO_ITER_ON_REF),
15091508
LintId::of(methods::ITER_CLONED_COLLECT),
15101509
LintId::of(methods::ITER_NEXT_SLICE),

clippy_lints/src/methods/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ declare_clippy_lint! {
15301530
/// assert_eq!(v, vec![5, 5, 5, 5, 5]);
15311531
/// ```
15321532
pub FROM_ITER_INSTEAD_OF_COLLECT,
1533-
style,
1533+
pedantic,
15341534
"use `.collect()` instead of `::from_iter()`"
15351535
}
15361536

0 commit comments

Comments
 (0)