mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-26 04:17:21 +00:00
As this is a lint about "style", and a purely cosmetical choice (using `<A: Trait>` over `impl Trait`), a lot of other files needed to be allowed this lint.
56 lines
2.2 KiB
Text
56 lines
2.2 KiB
Text
error: these bounds contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:6:15
|
|
|
|
|
LL | fn bad_foo<T: Clone + Clone + Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/trait_duplication_in_bounds.rs:2:9
|
|
|
|
|
LL | #![deny(clippy::trait_duplication_in_bounds)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: these where clauses contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:12:8
|
|
|
|
|
LL | T: Clone + Clone + Clone + Copy,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
|
|
|
error: these bounds contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:40:26
|
|
|
|
|
LL | trait BadSelfTraitBound: Clone + Clone + Clone {
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
|
|
|
|
error: these where clauses contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:47:15
|
|
|
|
|
LL | Self: Clone + Clone + Clone;
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone`
|
|
|
|
error: these bounds contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:61:24
|
|
|
|
|
LL | trait BadTraitBound<T: Clone + Clone + Clone + Copy, U: Clone + Copy> {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
|
|
|
error: these where clauses contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:68:12
|
|
|
|
|
LL | T: Clone + Clone + Clone + Copy,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Clone + Copy`
|
|
|
|
error: these bounds contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:101:19
|
|
|
|
|
LL | fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32> + GenericTrait<u64>>(arg0: T) {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `GenericTrait<u64> + GenericTrait<u32>`
|
|
|
|
error: these bounds contain repeated elements
|
|
--> $DIR/trait_duplication_in_bounds.rs:109:22
|
|
|
|
|
LL | fn qualified_path<T: std::clone::Clone + Clone + foo::Clone>(arg0: T) {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::clone::Clone + foo::Clone`
|
|
|
|
error: aborting due to 8 previous errors
|
|
|