1
- error: these bounds contain repeated elements
1
+ error: this trait bound is already specified in the where clause
2
2
--> $DIR/repeated_where_clauses_or_trait_bounds.rs:6:15
3
3
|
4
4
LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
5
+ | ^^^^^
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/repeated_where_clauses_or_trait_bounds.rs:4:9
9
9
|
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
12
27
13
28
error: these where clauses contain repeated elements
14
29
--> $DIR/repeated_where_clauses_or_trait_bounds.rs:12:8
@@ -28,6 +43,14 @@ error: these where clauses contain repeated elements
28
43
LL | Self: Clone + Clone + Clone;
29
44
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
30
45
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
+
31
54
error: these bounds contain repeated elements
32
55
--> $DIR/repeated_where_clauses_or_trait_bounds.rs:61:24
33
56
|
@@ -40,17 +63,41 @@ error: these where clauses contain repeated elements
40
63
LL | T: Clone + Clone + Clone + Copy,
41
64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
42
65
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
+
43
82
error: these bounds contain repeated elements
44
83
--> $DIR/repeated_where_clauses_or_trait_bounds.rs:101:19
45
84
|
46
85
LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
47
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `GenericTrait<u32> + GenericTrait<u64>`
48
87
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
+
49
96
error: these bounds contain repeated elements
50
97
--> $DIR/repeated_where_clauses_or_trait_bounds.rs:109:22
51
98
|
52
99
LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
53
100
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + foo::Clone`
54
101
55
- error: aborting due to 8 previous errors
102
+ error: aborting due to 14 previous errors
56
103
0 commit comments