2 #![deny(clippy::trait_duplication_in_bounds)]
5 fn bad_foo<T: Clone + Copy, U: Clone + Copy>(arg0: T, argo1: U) {
9 fn bad_bar<T, U>(arg0: T, arg1: U)
17 fn good_bar<T: Clone + Copy, U: Clone + Copy>(arg0: T, arg1: U) {
21 fn good_foo<T, U>(arg0: T, arg1: U)
29 trait GoodSelfTraitBound: Clone + Copy {
33 trait GoodSelfWhereClause {
39 trait BadSelfTraitBound: Clone {
43 trait BadSelfWhereClause {
49 trait GoodTraitBound<T: Clone + Copy, U: Clone + Copy> {
53 trait GoodWhereClause<T, U> {
60 trait BadTraitBound<T: Clone + Copy, U: Clone + Copy> {
64 trait BadWhereClause<T, U> {
71 struct GoodStructBound<T: Clone + Copy, U: Clone + Copy> {
76 impl<T: Clone + Copy, U: Clone + Copy> GoodTraitBound<T, U> for GoodStructBound<T, U> {
77 // this should not warn
81 struct GoodStructWhereClause;
83 impl<T, U> GoodTraitBound<T, U> for GoodStructWhereClause
88 // this should not warn
92 fn no_error_separate_arg_bounds(program: impl AsRef<()>, dir: impl AsRef<()>, args: &[impl AsRef<()>]) {}
94 trait GenericTrait<T> {}
96 fn good_generic<T: GenericTrait<u64> + GenericTrait<u32>>(arg0: T) {
100 fn bad_generic<T: GenericTrait<u64> + GenericTrait<u32>>(arg0: T) {
108 fn qualified_path<T: std::clone::Clone + foo::Clone>(arg0: T) {