Skip to content

Commit

Permalink
Auto merge of #4403 - xd009642:type_repetition_improvements, r=phansc…
Browse files Browse the repository at this point in the history
…h,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
  • Loading branch information
bors committed Aug 18, 2019
2 parents b233685 + 76598ad commit 2d493ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -871,7 +872,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,
Expand Down Expand Up @@ -1058,7 +1058,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,
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/trait_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare_clippy_lint! {
/// pub fn foo<T>(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: _`"
}

Expand Down
2 changes: 1 addition & 1 deletion src/lintlist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@ pub const ALL_LINTS: [Lint; 310] = [
},
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",
Expand Down

0 comments on commit 2d493ed

Please sign in to comment.