1 error: this trait bound is already specified in the where clause
2 --> $DIR/trait_duplication_in_bounds.rs:7:15
4 LL | fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
7 note: the lint level is defined here
8 --> $DIR/trait_duplication_in_bounds.rs:1:9
10 LL | #![deny(clippy::trait_duplication_in_bounds)]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 = help: consider removing this trait bound
14 error: this trait bound is already specified in the where clause
15 --> $DIR/trait_duplication_in_bounds.rs:7:23
17 LL | fn bad_foo<T: Clone + Default, Z: Copy>(arg0: T, arg1: Z)
20 = help: consider removing this trait bound
22 error: this trait bound is already specified in trait declaration
23 --> $DIR/trait_duplication_in_bounds.rs:36:15
28 = help: consider removing this trait bound
30 error: this trait bound is already specified in trait declaration
31 --> $DIR/trait_duplication_in_bounds.rs:50:15
33 LL | Self: Default + Clone;
36 = help: consider removing this trait bound
38 error: this trait bound is already specified in trait declaration
39 --> $DIR/trait_duplication_in_bounds.rs:56:15
41 LL | Self: Default + Clone;
44 = help: consider removing this trait bound
46 error: this trait bound is already specified in trait declaration
47 --> $DIR/trait_duplication_in_bounds.rs:56:25
49 LL | Self: Default + Clone;
52 = help: consider removing this trait bound
54 error: this trait bound is already specified in trait declaration
55 --> $DIR/trait_duplication_in_bounds.rs:59:15
60 = help: consider removing this trait bound
62 error: this trait bound is already specified in trait declaration
63 --> $DIR/trait_duplication_in_bounds.rs:94:15
65 LL | Self: Iterator<Item = Foo>,
66 | ^^^^^^^^^^^^^^^^^^^^
68 = help: consider removing this trait bound
70 error: this trait bound is already specified in the where clause
71 --> $DIR/trait_duplication_in_bounds.rs:103:19
73 LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
76 = help: consider removing this trait bound
78 error: these bounds contain repeated elements
79 --> $DIR/trait_duplication_in_bounds.rs:103:19
81 LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
84 error: this trait bound is already specified in the where clause
85 --> $DIR/trait_duplication_in_bounds.rs:109:12
87 LL | T: Clone + Clone + Clone + Copy,
90 = help: consider removing this trait bound
92 error: these where clauses contain repeated elements
93 --> $DIR/trait_duplication_in_bounds.rs:109:12
95 LL | T: Clone + Clone + Clone + Copy,
96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
98 error: these bounds contain repeated elements
99 --> $DIR/trait_duplication_in_bounds.rs:137:30
101 LL | trait BadSelfTraitBound: Clone + Clone + Clone {
102 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
104 error: these where clauses contain repeated elements
105 --> $DIR/trait_duplication_in_bounds.rs:144:19
107 LL | Self: Clone + Clone + Clone;
108 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
110 error: this trait bound is already specified in the where clause
111 --> $DIR/trait_duplication_in_bounds.rs:158:28
113 LL | trait BadTraitBound<T: Clone + Clone + Clone + Copy, U: Clone + Copy> {
116 = help: consider removing this trait bound
118 error: these bounds contain repeated elements
119 --> $DIR/trait_duplication_in_bounds.rs:158:28
121 LL | trait BadTraitBound<T: Clone + Clone + Clone + Copy, U: Clone + Copy> {
122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
124 error: these where clauses contain repeated elements
125 --> $DIR/trait_duplication_in_bounds.rs:165:16
127 LL | T: Clone + Clone + Clone + Copy,
128 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
130 error: this trait bound is already specified in the where clause
131 --> $DIR/trait_duplication_in_bounds.rs:195:24
133 LL | fn good_generic<T: GenericTrait<u64> + GenericTrait<u32>>(arg0: T) {
136 = help: consider removing this trait bound
138 error: this trait bound is already specified in the where clause
139 --> $DIR/trait_duplication_in_bounds.rs:199:23
141 LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
144 = help: consider removing this trait bound
146 error: these bounds contain repeated elements
147 --> $DIR/trait_duplication_in_bounds.rs:199:23
149 LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `GenericTrait<u32> + GenericTrait<u64>`
152 error: this trait bound is already specified in the where clause
153 --> $DIR/trait_duplication_in_bounds.rs:207:26
155 LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
158 = help: consider removing this trait bound
160 error: these bounds contain repeated elements
161 --> $DIR/trait_duplication_in_bounds.rs:207:26
163 LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
164 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + foo::Clone`
166 error: aborting due to 22 previous errors