mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
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 changelog: move `type_repetition_in_bounds` to `pedantic`
This commit is contained in:
commit
f01a0c0e08
3 changed files with 3 additions and 4 deletions
|
@ -666,6 +666,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
||||||
replace_consts::REPLACE_CONSTS,
|
replace_consts::REPLACE_CONSTS,
|
||||||
shadow::SHADOW_UNRELATED,
|
shadow::SHADOW_UNRELATED,
|
||||||
strings::STRING_ADD_ASSIGN,
|
strings::STRING_ADD_ASSIGN,
|
||||||
|
trait_bounds::TYPE_REPETITION_IN_BOUNDS,
|
||||||
types::CAST_POSSIBLE_TRUNCATION,
|
types::CAST_POSSIBLE_TRUNCATION,
|
||||||
types::CAST_POSSIBLE_WRAP,
|
types::CAST_POSSIBLE_WRAP,
|
||||||
types::CAST_PRECISION_LOSS,
|
types::CAST_PRECISION_LOSS,
|
||||||
|
@ -871,7 +872,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
||||||
swap::ALMOST_SWAPPED,
|
swap::ALMOST_SWAPPED,
|
||||||
swap::MANUAL_SWAP,
|
swap::MANUAL_SWAP,
|
||||||
temporary_assignment::TEMPORARY_ASSIGNMENT,
|
temporary_assignment::TEMPORARY_ASSIGNMENT,
|
||||||
trait_bounds::TYPE_REPETITION_IN_BOUNDS,
|
|
||||||
transmute::CROSSPOINTER_TRANSMUTE,
|
transmute::CROSSPOINTER_TRANSMUTE,
|
||||||
transmute::TRANSMUTE_BYTES_TO_STR,
|
transmute::TRANSMUTE_BYTES_TO_STR,
|
||||||
transmute::TRANSMUTE_INT_TO_BOOL,
|
transmute::TRANSMUTE_INT_TO_BOOL,
|
||||||
|
@ -1058,7 +1058,6 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
||||||
reference::REF_IN_DEREF,
|
reference::REF_IN_DEREF,
|
||||||
swap::MANUAL_SWAP,
|
swap::MANUAL_SWAP,
|
||||||
temporary_assignment::TEMPORARY_ASSIGNMENT,
|
temporary_assignment::TEMPORARY_ASSIGNMENT,
|
||||||
trait_bounds::TYPE_REPETITION_IN_BOUNDS,
|
|
||||||
transmute::CROSSPOINTER_TRANSMUTE,
|
transmute::CROSSPOINTER_TRANSMUTE,
|
||||||
transmute::TRANSMUTE_BYTES_TO_STR,
|
transmute::TRANSMUTE_BYTES_TO_STR,
|
||||||
transmute::TRANSMUTE_INT_TO_BOOL,
|
transmute::TRANSMUTE_INT_TO_BOOL,
|
||||||
|
|
|
@ -24,7 +24,7 @@ declare_clippy_lint! {
|
||||||
/// pub fn foo<T>(t: T) where T: Copy + Clone {}
|
/// pub fn foo<T>(t: T) where T: Copy + Clone {}
|
||||||
/// ```
|
/// ```
|
||||||
pub TYPE_REPETITION_IN_BOUNDS,
|
pub TYPE_REPETITION_IN_BOUNDS,
|
||||||
complexity,
|
pedantic,
|
||||||
"Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`"
|
"Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1864,7 +1864,7 @@ pub const ALL_LINTS: [Lint; 310] = [
|
||||||
},
|
},
|
||||||
Lint {
|
Lint {
|
||||||
name: "type_repetition_in_bounds",
|
name: "type_repetition_in_bounds",
|
||||||
group: "complexity",
|
group: "pedantic",
|
||||||
desc: "Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`",
|
desc: "Types are repeated unnecessary in trait bounds use `+` instead of using `T: _, T: _`",
|
||||||
deprecation: None,
|
deprecation: None,
|
||||||
module: "trait_bounds",
|
module: "trait_bounds",
|
||||||
|
|
Loading…
Reference in a new issue