1- error: these bounds contain repeated elements
1+ error: this trait bound is already specified in the where clause
22 --> $DIR/repeated_where_clauses_or_trait_bounds.rs:6:15
33 |
44LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
5- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
5+ | ^^^^^
66 |
77note: the lint level is defined here
88 --> $DIR/repeated_where_clauses_or_trait_bounds.rs:4:9
99 |
10- LL | #![deny(clippy::repeated_where_clauses_or_trait_bounds)]
11- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10+ LL | #![deny(clippy::trait_duplication_in_bounds)]
11+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+ = help: consider removing this trait bound
13+
14+ error: these bounds contain repeated elements
15+ --> $DIR/repeated_where_clauses_or_trait_bounds.rs:6:15
16+ |
17+ LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
18+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
19+
20+ error: this trait bound is already specified in the where clause
21+ --> $DIR/repeated_where_clauses_or_trait_bounds.rs:12:8
22+ |
23+ LL | T: Clone + Clone + Clone + Copy,
24+ | ^^^^^
25+ |
26+ = help: consider removing this trait bound
1227
1328error: these where clauses contain repeated elements
1429 --> $DIR/repeated_where_clauses_or_trait_bounds.rs:12:8
@@ -28,6 +43,14 @@ error: these where clauses contain repeated elements
2843LL | Self: Clone + Clone + Clone;
2944 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
3045
46+ error: this trait bound is already specified in the where clause
47+ --> $DIR/repeated_where_clauses_or_trait_bounds.rs:61:24
48+ |
49+ LL | trait BadTraitBound<T: Clone + Clone + Clone + Copy, U: Clone + Copy> {
50+ | ^^^^^
51+ |
52+ = help: consider removing this trait bound
53+
3154error: these bounds contain repeated elements
3255 --> $DIR/repeated_where_clauses_or_trait_bounds.rs:61:24
3356 |
@@ -40,17 +63,41 @@ error: these where clauses contain repeated elements
4063LL | T: Clone + Clone + Clone + Copy,
4164 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
4265
66+ error: this trait bound is already specified in the where clause
67+ --> $DIR/repeated_where_clauses_or_trait_bounds.rs:97:20
68+ |
69+ LL | fn good_generic<T: GenericTrait<u64> + GenericTrait<u32>>(arg0: T) {
70+ | ^^^^^^^^^^^^^^^^^
71+ |
72+ = help: consider removing this trait bound
73+
74+ error: this trait bound is already specified in the where clause
75+ --> $DIR/repeated_where_clauses_or_trait_bounds.rs:101:19
76+ |
77+ LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
78+ | ^^^^^^^^^^^^^^^^^
79+ |
80+ = help: consider removing this trait bound
81+
4382error: these bounds contain repeated elements
4483 --> $DIR/repeated_where_clauses_or_trait_bounds.rs:101:19
4584 |
4685LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
4786 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `GenericTrait<u32> + GenericTrait<u64>`
4887
88+ error: this trait bound is already specified in the where clause
89+ --> $DIR/repeated_where_clauses_or_trait_bounds.rs:109:22
90+ |
91+ LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
92+ | ^^^^^^^^^^^^^^^^^
93+ |
94+ = help: consider removing this trait bound
95+
4996error: these bounds contain repeated elements
5097 --> $DIR/repeated_where_clauses_or_trait_bounds.rs:109:22
5198 |
5299LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
53100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + foo::Clone`
54101
55- error: aborting due to 8 previous errors
102+ error: aborting due to 14 previous errors
56103
0 commit comments