Skip to content

Commit 2d493ed

Browse files
committed
Auto merge of #4403 - xd009642:type_repetition_improvements, r=phansch,flip1995
Improvements to `type_repetition_in_bounds` Improvements to the `type_repetition_in_bounds` trait based on feedback from #4380 #4326 #4323 Currently just make it pedantic. Hopefully, more to come
2 parents b233685 + 76598ad commit 2d493ed

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

clippy_lints/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
666666
replace_consts::REPLACE_CONSTS,
667667
shadow::SHADOW_UNRELATED,
668668
strings::STRING_ADD_ASSIGN,
669+
trait_bounds::TYPE_REPETITION_IN_BOUNDS,
669670
types::CAST_POSSIBLE_TRUNCATION,
670671
types::CAST_POSSIBLE_WRAP,
671672
types::CAST_PRECISION_LOSS,
@@ -871,7 +872,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
871872
swap::ALMOST_SWAPPED,
872873
swap::MANUAL_SWAP,
873874
temporary_assignment::TEMPORARY_ASSIGNMENT,
874-
trait_bounds::TYPE_REPETITION_IN_BOUNDS,
875875
transmute::CROSSPOINTER_TRANSMUTE,
876876
transmute::TRANSMUTE_BYTES_TO_STR,
877877
transmute::TRANSMUTE_INT_TO_BOOL,
@@ -1058,7 +1058,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
10581058
reference::REF_IN_DEREF,
10591059
swap::MANUAL_SWAP,
10601060
temporary_assignment::TEMPORARY_ASSIGNMENT,
1061-
trait_bounds::TYPE_REPETITION_IN_BOUNDS,
10621061
transmute::CROSSPOINTER_TRANSMUTE,
10631062
transmute::TRANSMUTE_BYTES_TO_STR,
10641063
transmute::TRANSMUTE_INT_TO_BOOL,

clippy_lints/src/trait_bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare_clippy_lint! {
2424
/// pub fn foo<T>(t: T) where T: Copy + Clone {}
2525
/// ```
2626
pub TYPE_REPETITION_IN_BOUNDS,
27-
complexity,
27+
pedantic,
2828
"Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`"
2929
}
3030

src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ pub const ALL_LINTS: [Lint; 310] = [
18641864
},
18651865
Lint {
18661866
name: "type_repetition_in_bounds",
1867-
group: "complexity",
1867+
group: "pedantic",
18681868
desc: "Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`",
18691869
deprecation: None,
18701870
module: "trait_bounds",

0 commit comments

Comments
 (0)