From c1e57402d314d24dd1eaa20b13f082707288cce1 Mon Sep 17 00:00:00 2001 From: xd009642 Date: Sat, 17 Aug 2019 11:45:05 +0100 Subject: [PATCH 1/2] Made lint pedantic --- clippy_lints/src/trait_bounds.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/trait_bounds.rs b/clippy_lints/src/trait_bounds.rs index bf4c5d65db63..edb91d617ee4 100644 --- a/clippy_lints/src/trait_bounds.rs +++ b/clippy_lints/src/trait_bounds.rs @@ -24,7 +24,7 @@ declare_clippy_lint! { /// pub fn foo(t: T) where T: Copy + Clone {} /// ``` pub TYPE_REPETITION_IN_BOUNDS, - complexity, + pedantic, "Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`" } From 76598adafb2c3032a87544b260584fb526a6f2a5 Mon Sep 17 00:00:00 2001 From: xd009642 Date: Sun, 18 Aug 2019 16:59:31 +0100 Subject: [PATCH 2/2] Run update_lints --- clippy_lints/src/lib.rs | 3 +-- src/lintlist/mod.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 3054f11c1769..8f5dc88e6de9 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -666,6 +666,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) { replace_consts::REPLACE_CONSTS, shadow::SHADOW_UNRELATED, strings::STRING_ADD_ASSIGN, + trait_bounds::TYPE_REPETITION_IN_BOUNDS, types::CAST_POSSIBLE_TRUNCATION, types::CAST_POSSIBLE_WRAP, types::CAST_PRECISION_LOSS, @@ -870,7 +871,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) { swap::ALMOST_SWAPPED, swap::MANUAL_SWAP, temporary_assignment::TEMPORARY_ASSIGNMENT, - trait_bounds::TYPE_REPETITION_IN_BOUNDS, transmute::CROSSPOINTER_TRANSMUTE, transmute::TRANSMUTE_BYTES_TO_STR, transmute::TRANSMUTE_INT_TO_BOOL, @@ -1056,7 +1056,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) { reference::REF_IN_DEREF, swap::MANUAL_SWAP, temporary_assignment::TEMPORARY_ASSIGNMENT, - trait_bounds::TYPE_REPETITION_IN_BOUNDS, transmute::CROSSPOINTER_TRANSMUTE, transmute::TRANSMUTE_BYTES_TO_STR, transmute::TRANSMUTE_INT_TO_BOOL, diff --git a/src/lintlist/mod.rs b/src/lintlist/mod.rs index 0df8370936c8..7d36825df0ab 100644 --- a/src/lintlist/mod.rs +++ b/src/lintlist/mod.rs @@ -1857,7 +1857,7 @@ pub const ALL_LINTS: [Lint; 309] = [ }, Lint { name: "type_repetition_in_bounds", - group: "complexity", + group: "pedantic", desc: "Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`", deprecation: None, module: "trait_bounds",