1 #![warn(clippy::mismatching_type_param_order)]
2 #![allow(clippy::disallowed_names)]
10 // lint on both params
11 impl<B, A> Foo<B, A> {}
13 // lint on the 2nd param
14 impl<C, A> Foo<C, A> {}
17 impl<A, B> Foo<A, B> {}
19 struct FooLifetime<'l, 'm, A, B> {
24 // should not lint on lifetimes
25 impl<'m, 'l, B, A> FooLifetime<'m, 'l, B, A> {}
34 // also works for enums
35 enum FooEnum<A, B, C> {
41 impl<C, A, B> FooEnum<C, A, B> {}
43 // also works for unions
44 union FooUnion<A: Copy, B>
52 impl<B: Copy, A> FooUnion<B, A> where A: Copy {}
54 impl<A, B> FooUnion<A, B>
61 // if the types are complicated, do not lint
62 impl<K, V, B> Foo<(K, V), B> {}
63 impl<K, V, A> Foo<(K, V), A> {}