summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/mismatching_type_param_order.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/mismatching_type_param_order.rs')
-rw-r--r--src/tools/clippy/tests/ui/mismatching_type_param_order.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/mismatching_type_param_order.rs b/src/tools/clippy/tests/ui/mismatching_type_param_order.rs
index 40c1fcae1..af2882e41 100644
--- a/src/tools/clippy/tests/ui/mismatching_type_param_order.rs
+++ b/src/tools/clippy/tests/ui/mismatching_type_param_order.rs
@@ -9,9 +9,12 @@ fn main() {
// lint on both params
impl<B, A> Foo<B, A> {}
+ //~^ ERROR: `Foo` has a similarly named generic type parameter `B` in its declaration,
+ //~| ERROR: `Foo` has a similarly named generic type parameter `A` in its declaration,
// lint on the 2nd param
impl<C, A> Foo<C, A> {}
+ //~^ ERROR: `Foo` has a similarly named generic type parameter `A` in its declaration,
// should not lint
impl<A, B> Foo<A, B> {}
@@ -23,6 +26,8 @@ fn main() {
// should not lint on lifetimes
impl<'m, 'l, B, A> FooLifetime<'m, 'l, B, A> {}
+ //~^ ERROR: `FooLifetime` has a similarly named generic type parameter `B` in its decl
+ //~| ERROR: `FooLifetime` has a similarly named generic type parameter `A` in its decl
struct Bar {
x: i32,
@@ -39,6 +44,9 @@ fn main() {
}
impl<C, A, B> FooEnum<C, A, B> {}
+ //~^ ERROR: `FooEnum` has a similarly named generic type parameter `C` in its declarat
+ //~| ERROR: `FooEnum` has a similarly named generic type parameter `A` in its declarat
+ //~| ERROR: `FooEnum` has a similarly named generic type parameter `B` in its declarat
// also works for unions
union FooUnion<A: Copy, B>
@@ -50,6 +58,8 @@ fn main() {
}
impl<B: Copy, A> FooUnion<B, A> where A: Copy {}
+ //~^ ERROR: `FooUnion` has a similarly named generic type parameter `B` in its declara
+ //~| ERROR: `FooUnion` has a similarly named generic type parameter `A` in its declara
impl<A, B> FooUnion<A, B>
where