Skip to content

Commit ed8458f

Browse files
committed
(Partially) Revert "HACK: Move buggy lints to nursery"
This reverts commit bb01aca. Partial: Keep regression tests
1 parent 7cd86aa commit ed8458f

5 files changed

+6
-22
lines changed

clippy_lints/src/lib.register_nursery.rs

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
2828
LintId::of(strings::STRING_LIT_AS_BYTES),
2929
LintId::of(suspicious_operation_groupings::SUSPICIOUS_OPERATION_GROUPINGS),
3030
LintId::of(trailing_empty_array::TRAILING_EMPTY_ARRAY),
31-
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
32-
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
3331
LintId::of(transmute::TRANSMUTE_UNDEFINED_REPR),
3432
LintId::of(transmute::USELESS_TRANSMUTE),
3533
LintId::of(use_self::USE_SELF),

clippy_lints/src/lib.register_pedantic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
8484
LintId::of(semicolon_if_nothing_returned::SEMICOLON_IF_NOTHING_RETURNED),
8585
LintId::of(stable_sort_primitive::STABLE_SORT_PRIMITIVE),
8686
LintId::of(strings::STRING_ADD_ASSIGN),
87+
LintId::of(trait_bounds::TRAIT_DUPLICATION_IN_BOUNDS),
88+
LintId::of(trait_bounds::TYPE_REPETITION_IN_BOUNDS),
8789
LintId::of(transmute::TRANSMUTE_PTR_TO_PTR),
8890
LintId::of(types::LINKEDLIST),
8991
LintId::of(types::OPTION_OPTION),

clippy_lints/src/trait_bounds.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ declare_clippy_lint! {
3535
/// ```
3636
#[clippy::version = "1.38.0"]
3737
pub TYPE_REPETITION_IN_BOUNDS,
38-
nursery,
38+
pedantic,
3939
"Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`"
4040
}
4141

@@ -65,7 +65,7 @@ declare_clippy_lint! {
6565
/// ```
6666
#[clippy::version = "1.47.0"]
6767
pub TRAIT_DUPLICATION_IN_BOUNDS,
68-
nursery,
68+
pedantic,
6969
"Check if the same trait bounds are specified twice during a function declaration"
7070
}
7171

tests/ui/trait_duplication_in_bounds.stderr

+1-9
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,5 @@ LL | Self: Iterator<Item = Foo>,
6767
|
6868
= help: consider removing this trait bound
6969

70-
error: this trait bound is already specified in the where clause
71-
--> $DIR/trait_duplication_in_bounds.rs:99:23
72-
|
73-
LL | fn impl_trait(_: impl AsRef<str>, _: impl AsRef<str>) {}
74-
| ^^^^^^^^^^
75-
|
76-
= help: consider removing this trait bound
77-
78-
error: aborting due to 9 previous errors
70+
error: aborting due to 8 previous errors
7971

tests/ui/type_repetition_in_bounds.stderr

+1-9
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,5 @@ LL | Self: Copy + Default + Ord,
1919
|
2020
= help: consider combining the bounds: `Self: Clone + Copy + Default + Ord`
2121

22-
error: this type has already been used as a bound predicate
23-
--> $DIR/type_repetition_in_bounds.rs:83:43
24-
|
25-
LL | fn impl_trait(_: impl AsRef<str>, _: impl AsRef<str>) {}
26-
| ^^^^^^^^^^
27-
|
28-
= help: consider combining the bounds: `impl AsRef<str>: AsRef<str> + AsRef<str>`
29-
30-
error: aborting due to 3 previous errors
22+
error: aborting due to 2 previous errors
3123

0 commit comments

Comments
 (0)