2022-08-31 08:24:45 -05:00
|
|
|
error: these bounds contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:7:15
|
2020-08-11 08:43:21 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
2020-08-11 08:43:21 -05:00
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:1:9
|
2020-08-11 08:43:21 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::trait_duplication_in_bounds)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these where clauses contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:13:8
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | T: Clone + Clone + Clone + Copy,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these bounds contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:41:26
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | trait BadSelfTraitBound: Clone + Clone + Clone {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these where clauses contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:48:15
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | Self: Clone + Clone + Clone;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these bounds contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:62:24
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | trait BadTraitBound<T: Clone + Clone + Clone + Copy, U: Clone + Copy> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these where clauses contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:69:12
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | T: Clone + Clone + Clone + Copy,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these bounds contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:102:19
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `GenericTrait<u64> + GenericTrait<u32>`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
|
|
error: these bounds contain repeated elements
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:110:22
|
2022-07-18 02:39:37 -05:00
|
|
|
|
|
2022-08-31 08:24:45 -05:00
|
|
|
LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::clone::Clone + foo::Clone`
|
2022-07-18 02:39:37 -05:00
|
|
|
|
2023-05-20 08:39:26 -05:00
|
|
|
error: this trait bound is already specified in trait declaration
|
2024-10-18 06:44:06 -05:00
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:118:33
|
2023-05-20 08:39:26 -05:00
|
|
|
|
|
|
|
|
LL | fn bad_trait_object(arg0: &(dyn Any + Send + Send)) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `Any + Send`
|
|
|
|
|
2024-10-18 06:44:06 -05:00
|
|
|
error: these bounds contain repeated elements
|
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:165:36
|
|
|
|
|
|
|
|
|
LL | const fn const_trait_bounds_bad<T: ~const ConstTrait + ~const ConstTrait>() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `~const ConstTrait`
|
|
|
|
|
|
|
|
error: these where clauses contain repeated elements
|
|
|
|
--> tests/ui/trait_duplication_in_bounds.rs:172:8
|
|
|
|
|
|
|
|
|
LL | T: IntoIterator<Item = U::Owned> + IntoIterator<Item = U::Owned>,
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `IntoIterator<Item = U::Owned>`
|
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
2020-08-11 08:43:21 -05:00
|
|
|
|